Skip to content

Commit

Permalink
Use 10px as a default vertex search radius. (should be a more sensiti…
Browse files Browse the repository at this point in the history
…ve tolerance than 10 map units)

git-svn-id: http://svn.osgeo.org/qgis/trunk@12514 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 19, 2009
1 parent f969bd1 commit 4e0bae4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsoptions.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
index = mDefaultSnappingToleranceComboBox->findText( tr( "pixels" ) ); index = mDefaultSnappingToleranceComboBox->findText( tr( "pixels" ) );
} }
mDefaultSnappingToleranceComboBox->setCurrentIndex( index ); mDefaultSnappingToleranceComboBox->setCurrentIndex( index );
if ( settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt() == QgsTolerance::MapUnits ) if ( settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", QgsTolerance::Pixels ).toInt() == QgsTolerance::MapUnits )
{ {
index = mSearchRadiusVertexEditComboBox->findText( tr( "map units" ) ); index = mSearchRadiusVertexEditComboBox->findText( tr( "map units" ) );
} }
else else
{ {
index = mSearchRadiusVertexEditComboBox->findText( tr( "pixels" ) ); index = mSearchRadiusVertexEditComboBox->findText( tr( "pixels" ) );
} }
mSearchRadiusVertexEditComboBox->setCurrentIndex( settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt() ); mSearchRadiusVertexEditComboBox->setCurrentIndex( index );


//vertex marker //vertex marker
mMarkersOnlyForSelectedCheckBox->setChecked( settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool() ); mMarkersOnlyForSelectedCheckBox->setChecked( settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool() );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgstolerance.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ double QgsTolerance::vertexSearchRadius( QgsMapLayer* layer, QgsMapRenderer* ren
{ {
QSettings settings; QSettings settings;
double tolerance = settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble(); double tolerance = settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble();
UnitType units = ( QgsTolerance::UnitType ) settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt(); UnitType units = ( QgsTolerance::UnitType ) settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", QgsTolerance::Pixels ).toInt();
return toleranceInMapUnits( tolerance, layer, renderer, units ); return toleranceInMapUnits( tolerance, layer, renderer, units );
} }


Expand Down

0 comments on commit 4e0bae4

Please sign in to comment.