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/qgis@12514 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Dec 19, 2009
1 parent 13cce2a commit 6a314a5015cdbec4f8ba98286a13cfcff81ae637
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 6a314a5

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