Skip to content

Commit

Permalink
allow to ignore (OGR's interpretation of ) shape file encoding (might f…
Browse files Browse the repository at this point in the history
…ix #5911)
  • Loading branch information
jef-n committed Aug 16, 2012
1 parent b2f3214 commit 75dc85b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/qgsoptions.cpp
Expand Up @@ -373,6 +373,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
cbxCreateRasterLegendIcons->setChecked( settings.value( "/qgis/createRasterLegendIcons", true ).toBool() );
cbxCopyWKTGeomFromTable->setChecked( settings.value( "/qgis/copyGeometryAsWKT", true ).toBool() );
leNullValue->setText( settings.value( "qgis/nullValue", "NULL" ).toString() );
cbxIgnoreShapeEncoding->setChecked( settings.value( "/qgis/ignoreShapeEncoding", false ).toBool() );

cmbLegendDoubleClickAction->setCurrentIndex( settings.value( "/qgis/legendDoubleClickAction", 0 ).toInt() );

Expand Down Expand Up @@ -810,6 +811,7 @@ void QgsOptions::saveOptions()
cmbScanItemsInBrowser->itemData( cmbScanItemsInBrowser->currentIndex() ).toString() );
settings.setValue( "/qgis/scanZipInBrowser",
cmbScanZipInBrowser->itemData( cmbScanZipInBrowser->currentIndex() ).toString() );
settings.setValue( "/qgis/ignoreShapeEncoding", cbxIgnoreShapeEncoding->isChecked() );
settings.setValue( "/qgis/dockIdentifyResults", cbxIdentifyResultsDocked->isChecked() );
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() );
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() );
Expand Down
3 changes: 3 additions & 0 deletions src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -205,6 +205,9 @@ QgsOgrProvider::QgsOgrProvider( QString const & uri )

QgsApplication::registerOgrDrivers();

QSettings settings;
CPLSetConfigOption( "SHAPE_ENCODING", settings.value( "/qgis/ignoreShapeEncoding", false ).toBool() ? "" : 0 );

// set the selection rectangle pointer to 0
mSelectionRectangle = 0;
// make connection to the data source
Expand Down
7 changes: 7 additions & 0 deletions src/ui/qgsoptionsbase.ui
Expand Up @@ -528,6 +528,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbxIgnoreShapeEncoding">
<property name="text">
<string>Ignore shapefile encoding</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
Expand Down

0 comments on commit 75dc85b

Please sign in to comment.