mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
show selected selection or measure tool in toolbutton
git-svn-id: http://svn.osgeo.org/qgis/trunk@14102 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
621196077a
commit
64e028bbf1
@ -1720,6 +1720,7 @@ void QgisApp::createToolBars()
|
||||
menu->addAction( mActionSelectRadius );
|
||||
bt->setDefaultAction( mActionSelect );
|
||||
mAttributesToolBar->addWidget( bt );
|
||||
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
|
||||
|
||||
mAttributesToolBar->addAction( mActionDeselectAll );
|
||||
mAttributesToolBar->addAction( mActionOpenTable );
|
||||
@ -1733,6 +1734,7 @@ void QgisApp::createToolBars()
|
||||
menu->addAction( mActionMeasureAngle );
|
||||
bt->setDefaultAction( mActionMeasure );
|
||||
mAttributesToolBar->addWidget( bt );
|
||||
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
|
||||
|
||||
mAttributesToolBar->addAction( mActionMapTips );
|
||||
mAttributesToolBar->addAction( mActionShowBookmarks );
|
||||
@ -7026,3 +7028,12 @@ void QgisApp::completeInitialization()
|
||||
{
|
||||
emit initializationCompleted();
|
||||
}
|
||||
|
||||
void QgisApp::toolButtonActionTriggered( QAction *action )
|
||||
{
|
||||
QToolButton *bt = qobject_cast<QToolButton *>( sender() );
|
||||
if ( !bt )
|
||||
return;
|
||||
|
||||
bt->setDefaultAction( action );
|
||||
}
|
||||
|
@ -437,6 +437,9 @@ class QgisApp : public QMainWindow
|
||||
void namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors );
|
||||
#endif
|
||||
|
||||
//! update default action of toolbutton
|
||||
void toolButtonActionTriggered( QAction * );
|
||||
|
||||
protected:
|
||||
|
||||
//! Handle state changes (WindowTitleChange)
|
||||
|
Loading…
x
Reference in New Issue
Block a user