Skip to content
Permalink
Browse files
fix #1319
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9418 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 28, 2008
1 parent 3fa3cb2 commit ab8d19a3092a67db79cab06b5ee48004976a03bb
Showing with 6 additions and 18 deletions.
  1. +6 −18 src/app/qgsoptions.cpp
@@ -165,11 +165,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
mLineColourToolButton->setColor( QColor( myRed, myGreen, myBlue ) );

//default snap mode
mDefaultSnapModeComboBox->insertItem( 0, tr( "to vertex" ) );
mDefaultSnapModeComboBox->insertItem( 1, tr( "to segment" ) );
mDefaultSnapModeComboBox->insertItem( 2, tr( "to vertex and segment" ) );
QString defaultSnapString = settings.value( "/qgis/digitizing/default_snap_mode", tr( "to vertex" ) ).toString();
mDefaultSnapModeComboBox->setCurrentIndex( mDefaultSnapModeComboBox->findText( defaultSnapString ) );
mDefaultSnapModeComboBox->insertItem( 0, tr( "to vertex" ), "to vertex" );
mDefaultSnapModeComboBox->insertItem( 1, tr( "to segment" ), "to segment" );
mDefaultSnapModeComboBox->insertItem( 2, tr( "to vertex and segment" ), "to vertex and segment" );
QString defaultSnapString = settings.value( "/qgis/digitizing/default_snap_mode", "to vertex").toString();
mDefaultSnapModeComboBox->setCurrentIndex( mDefaultSnapModeComboBox->findData( defaultSnapString ) );
mDefaultSnappingToleranceSpinBox->setValue( settings.value( "/qgis/digitizing/default_snapping_tolerance", 0 ).toDouble() );
mSearchRadiusVertexEditSpinBox->setValue( settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble() );

@@ -326,19 +326,7 @@ void QgsOptions::saveOptions()
settings.setValue( "/qgis/digitizing/line_color_blue", digitizingColor.blue() );

//default snap mode
QString defaultSnapModeString;
if ( mDefaultSnapModeComboBox->currentText() == tr( "to vertex" ) )
{
defaultSnapModeString = "to vertex";
}
else if ( mDefaultSnapModeComboBox->currentText() == tr( "to segment" ) )
{
defaultSnapModeString = "to segment";
}
else if ( mDefaultSnapModeComboBox->currentText() == tr( "to vertex and segment" ) )
{
defaultSnapModeString = "to vertex and segment";
}
QString defaultSnapModeString = mDefaultSnapModeComboBox->itemData( mDefaultSnapModeComboBox->currentIndex() ).toString();
settings.setValue( "/qgis/digitizing/default_snap_mode", defaultSnapModeString );
settings.setValue( "/qgis/digitizing/default_snapping_tolerance", mDefaultSnappingToleranceSpinBox->value() );
settings.setValue( "/qgis/digitizing/search_radius_vertex_edit", mSearchRadiusVertexEditSpinBox->value() );

0 comments on commit ab8d19a

Please sign in to comment.