Skip to content
Permalink
Browse files

Use 10px as a default vertex search radius. (should be a more sensiti…

…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
wonder committed Dec 19, 2009
1 parent f969bd1 commit 4e0bae4fa9e3595ddf308642fe9ff04dd4d78942
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/app/qgsoptions.cpp
  2. +1 −1 src/core/qgstolerance.cpp
@@ -248,15 +248,15 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
index = mDefaultSnappingToleranceComboBox->findText( tr( "pixels" ) );
}
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" ) );
}
else
{
index = mSearchRadiusVertexEditComboBox->findText( tr( "pixels" ) );
}
mSearchRadiusVertexEditComboBox->setCurrentIndex( settings.value( "/qgis/digitizing/search_radius_vertex_edit_unit", 0 ).toInt() );
mSearchRadiusVertexEditComboBox->setCurrentIndex( index );

//vertex marker
mMarkersOnlyForSelectedCheckBox->setChecked( settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool() );
@@ -35,7 +35,7 @@ double QgsTolerance::vertexSearchRadius( QgsMapLayer* layer, QgsMapRenderer* ren
{
QSettings settings;
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 );
}

0 comments on commit 4e0bae4

Please sign in to comment.
You can’t perform that action at this time.