Skip to content
Permalink
Browse files

save last used selection tool

git-svn-id: http://svn.osgeo.org/qgis/trunk@14555 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 12, 2010
1 parent 358e434 commit 7e1a38e7d9546f293b2e6aace052cbd1e758c03a
Showing with 38 additions and 2 deletions.
  1. +38 −2 src/app/qgisapp.cpp
@@ -1713,7 +1713,31 @@ void QgisApp::createToolBars()
menu->addAction( mActionSelectPolygon );
menu->addAction( mActionSelectFreehand );
menu->addAction( mActionSelectRadius );
bt->setDefaultAction( mActionSelect );

QSettings settings;
switch( settings.value( "/UI/selectTool", 0 ).toInt() )
{
default:
case 0:
bt->setDefaultAction( mActionSelect );
break;

case 1:
bt->setDefaultAction( mActionSelectRectangle );
break;

case 2:
bt->setDefaultAction( mActionSelectPolygon );
break;

case 3:
bt->setDefaultAction( mActionSelectFreehand );
break;

case 4:
bt->setDefaultAction( mActionSelectRadius );
break;
}
mAttributesToolBar->addWidget( bt );
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );

@@ -2528,7 +2552,7 @@ void QgisApp::about()
whatsNew += "<li>" + tr( "Experimental WFS-T support. Additionally ported wfs to network manager." ) + "</li>";
whatsNew += "<li>" + tr( "Georeferencer has had many tidy ups and improvements." ) + "</li>";
whatsNew += "<li>" + tr( "Support for long int in attribute dialog and editor." ) + "</li>";
whatsNew += "<li>" + tr( "The QGIS Mapserver project has been incorporated into the main SVN repository and packages are being made available. QGIS Mapserver allows you to serve your QGIS project files via the OGC WMS protocol." ) + " <a href=\"http://linfiniti.com/2010/08/qgis-mapserver-a-wms-server-for-the-masses/\">" + tr("Read More." ) + "</a></li>";
whatsNew += "<li>" + tr( "The QGIS Mapserver project has been incorporated into the main SVN repository and packages are being made available. QGIS Mapserver allows you to serve your QGIS project files via the OGC WMS protocol." ) + " <a href=\"http://linfiniti.com/2010/08/qgis-mapserver-a-wms-server-for-the-masses/\">" + tr( "Read More." ) + "</a></li>";
whatsNew += "<li>" + tr( "Select and measure toolbar flyouts and submenus." ) + "</li>";
whatsNew += "<li>" + tr( "Support has been added for non-spatial tables (currently OGR, delimited text and PostgreSQL providers). These tables can be used for field lookups or just generally browsed and edited using the table view." ) + "</li>";
whatsNew += "<li>" + tr( "Added search string support for feature ids ($id) and various other search related improvements." ) + "</li>";
@@ -6964,5 +6988,17 @@ void QgisApp::toolButtonActionTriggered( QAction *action )
if( !bt )
return;

QSettings settings;
if( action == mActionSelect )
settings.setValue( "/UI/selectTool", 0 );
else if( action == mActionSelectRectangle )
settings.setValue( "/UI/selectTool", 1 );
else if( action == mActionSelectPolygon )
settings.setValue( "/UI/selectTool", 2 );
else if( action == mActionSelectFreehand )
settings.setValue( "/UI/selectTool", 3 );
else if( action == mActionSelectRadius )
settings.setValue( "/UI/selectTool", 4 );

bt->setDefaultAction( action );
}

0 comments on commit 7e1a38e

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