Index: src/app/qgisapp.cpp =================================================================== --- src/app/qgisapp.cpp (revision 695) +++ src/app/qgisapp.cpp (working copy) @@ -879,9 +879,9 @@ mActionZoomOut->setStatusTip( tr( "Zoom Out" ) ); connect( mActionZoomOut, SIGNAL( triggered() ), this, SLOT( zoomOut() ) ); - mActionSelect = new QAction( getThemeIcon( "mActionSelect.png" ), tr( "Select Features" ) , this ); + mActionSelect = new QAction( getThemeIcon( "mActionSelect.png" ), tr( "Select single features" ) , this ); shortcuts->registerAction( mActionSelect ); - mActionSelect->setStatusTip( tr( "Select Features" ) ); + mActionSelect->setStatusTip( tr( "Select single feature" ) ); connect( mActionSelect, SIGNAL( triggered() ), this, SLOT( select() ) ); mActionSelect->setEnabled( false ); Index: src/app/qgsmaptoolselectutils.cpp =================================================================== --- src/app/qgsmaptoolselectutils.cpp (revision 689) +++ src/app/qgsmaptoolselectutils.cpp (working copy) @@ -22,6 +22,7 @@ #include "qgsfeature.h" #include "qgsgeometry.h" #include "qgsrubberband.h" +#include "qgsexception.h" #include "qgscsexception.h" #include "qgslogger.h" #include "qgis.h" @@ -29,6 +30,7 @@ #include #include #include +#include QgsVectorLayer* QgsMapToolSelectUtils::getCurrentVectorLayer( QgsMapCanvas* canvas ) { @@ -196,7 +198,25 @@ void QgsMapToolSelectUtils::setSelectFeatures( QgsMapCanvas* canvas, QgsGeometry* selectGeometry, QMouseEvent * e ) { - bool doContains = e->modifiers() & Qt::AltModifier ? false : true; + QSettings settings; + QString defaultSelectionMethod = settings.value( "/qgis/defaultSelectionMethod", "Intersects" ).toString(); + bool doContains; + if ( defaultSelectionMethod == "Contains" ) + { + doContains = true; + } + else if ( defaultSelectionMethod == "Intersects" ) + { + doContains = false; + } + else + { + throw QgsException( "Invalid defaultSelectionMethod setting: " + defaultSelectionMethod ); + } + if ( e->modifiers() & Qt::AltModifier ) + { + doContains = !doContains; + } bool addSelection = e->modifiers() & Qt::ControlModifier ? true : false; bool substractSelection = e->modifiers() & Qt::ShiftModifier ? true : false; setSelectFeatures( canvas, selectGeometry, doContains, addSelection, substractSelection ); Index: src/app/qgsoptions.cpp =================================================================== --- src/app/qgsoptions.cpp (revision 691) +++ src/app/qgsoptions.cpp (working copy) @@ -264,6 +264,17 @@ cmbWheelAction->setCurrentIndex( settings.value( "/qgis/wheel_action", 0 ).toInt() ); spinZoomFactor->setValue( settings.value( "/qgis/zoom_factor", 2 ).toDouble() ); + // populate the select method radio boxes + QString defaultSelectionMethod = settings.value( "/qgis/defaultSelectionMethod", "Intersects" ).toString(); + if ( defaultSelectionMethod == "Intersects" ) + { + mSelectIntersectsRadioButton->setChecked( true ); + } + else + { + mSelectContainsRadioButton->setChecked( true ); + } + // // Locale settings // @@ -603,6 +614,17 @@ settings.setValue( "/qgis/wheel_action", cmbWheelAction->currentIndex() ); settings.setValue( "/qgis/zoom_factor", spinZoomFactor->value() ); + + //set selection tool options + if ( mSelectIntersectsRadioButton->isChecked() ) + { + settings.setValue( "qgis/defaultSelectionMethod", "Intersects" ); + } + else if ( mSelectContainsRadioButton->isChecked() ) + { + settings.setValue( "qgis/defaultSelectionMethod", "Contains" ); + } + //digitizing settings.setValue( "/qgis/digitizing/line_width", mLineWidthSpinBox->value() ); QColor digitizingColor = mLineColorToolButton->color(); Index: src/ui/qgsoptionsbase.ui =================================================================== --- src/ui/qgsoptionsbase.ui (revision 691) +++ src/ui/qgsoptionsbase.ui (working copy) @@ -891,6 +891,59 @@ + + + Map select tools + + + + + + Default feature select method + + + + + + + Qt::Horizontal + + + + 406 + 20 + + + + + + + + <b>Note:</b> When using the region select tools press the Alt key to use the other select method + + + true + + + + + + + Intersects + + + + + + + Contains + + + + + + + Qt::Vertical