[QGIS Commit] r15126 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Feb 4 05:28:05 EST 2011
Author: timlinux
Date: 2011-02-04 02:28:05 -0800 (Fri, 04 Feb 2011)
New Revision: 15126
Modified:
trunk/qgis/src/app/qgisapp.cpp
Log:
Revert "Applied patch from #3447. Button group for add layer"
This reverts commit d1dfeae396b244bcb76076ef9ab80bfc42d05587.
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2011-02-03 23:18:42 UTC (rev 15125)
+++ trunk/qgis/src/app/qgisapp.cpp 2011-02-04 10:28:05 UTC (rev 15126)
@@ -1682,47 +1682,15 @@
mLayerToolBar = addToolBar( tr( "Manage Layers" ) );
mLayerToolBar->setIconSize( myIconSize );
mLayerToolBar->setObjectName( "LayerToolBar" );
-
- QToolButton *bt = new QToolButton( mLayerToolBar );
- bt->setObjectName( "AddLayer" );
- bt->setPopupMode( QToolButton::MenuButtonPopup );
- bt->addAction( mActionAddOgrLayer );
- bt->addAction( mActionAddRasterLayer );
+ mLayerToolBar->addAction( mActionAddOgrLayer );
+ mLayerToolBar->addAction( mActionAddRasterLayer );
#ifdef HAVE_POSTGRESQL
- bt->addAction( mActionAddPgLayer );
+ mLayerToolBar->addAction( mActionAddPgLayer );
#endif
#ifdef HAVE_SPATIALITE
- bt->addAction( mActionAddSpatiaLiteLayer );
+ mLayerToolBar->addAction( mActionAddSpatiaLiteLayer );
#endif
- bt->addAction( mActionAddWmsLayer );
-
- QSettings settings;
- switch ( settings.value( "/UI/addLayer", 0 ).toInt() )
- {
- default:
- case 0:
- bt->setDefaultAction( mActionAddOgrLayer );
- break;
-
- case 1:
- bt->setDefaultAction( mActionAddRasterLayer );
- break;
-
- case 2:
- bt->setDefaultAction( mActionAddPgLayer );
- break;
-
- case 3:
- bt->setDefaultAction( mActionAddSpatiaLiteLayer );
- break;
-
- case 4:
- bt->setDefaultAction( mActionAddWmsLayer );
- break;
- }
- mLayerToolBar->addWidget( bt );
- connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
-
+ mLayerToolBar->addAction( mActionAddWmsLayer );
mLayerToolBar->addAction( mActionNewVectorLayer );
mLayerToolBar->addAction( mActionRemoveLayer );
//commented out for QGIS 1.4 by Tim
@@ -1794,7 +1762,7 @@
mAttributesToolBar->setObjectName( "Attributes" );
mAttributesToolBar->addAction( mActionIdentify );
- bt = new QToolButton( mAttributesToolBar );
+ QToolButton *bt = new QToolButton( mAttributesToolBar );
bt->setObjectName( "SelectTool" );
bt->setPopupMode( QToolButton::MenuButtonPopup );
bt->addAction( mActionSelect );
@@ -1803,6 +1771,7 @@
bt->addAction( mActionSelectFreehand );
bt->addAction( mActionSelectRadius );
+ QSettings settings;
switch ( settings.value( "/UI/selectTool", 0 ).toInt() )
{
default:
@@ -7374,16 +7343,6 @@
settings.setValue( "/UI/annotationTool", 1 );
else if ( action == mActionAnnotation )
settings.setValue( "/UI/annotationTool", 2 );
- else if ( action == mActionAddOgrLayer )
- settings.setValue( "/UI/addLayer", 0 );
- else if ( action == mActionAddRasterLayer )
- settings.setValue( "/UI/addLayer", 1 );
- else if ( action == mActionAddPgLayer )
- settings.setValue( "/UI/addLayer", 2 );
- else if ( action == mActionAddSpatiaLiteLayer )
- settings.setValue( "/UI/addLayer", 3 );
- else if ( action == mActionAddWmsLayer )
- settings.setValue( "/UI/addLayer", 4 );
bt->setDefaultAction( action );
}
More information about the QGIS-commit
mailing list