mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04: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 );
|
menu->addAction( mActionSelectRadius );
|
||||||
bt->setDefaultAction( mActionSelect );
|
bt->setDefaultAction( mActionSelect );
|
||||||
mAttributesToolBar->addWidget( bt );
|
mAttributesToolBar->addWidget( bt );
|
||||||
|
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
|
||||||
|
|
||||||
mAttributesToolBar->addAction( mActionDeselectAll );
|
mAttributesToolBar->addAction( mActionDeselectAll );
|
||||||
mAttributesToolBar->addAction( mActionOpenTable );
|
mAttributesToolBar->addAction( mActionOpenTable );
|
||||||
@ -1733,6 +1734,7 @@ void QgisApp::createToolBars()
|
|||||||
menu->addAction( mActionMeasureAngle );
|
menu->addAction( mActionMeasureAngle );
|
||||||
bt->setDefaultAction( mActionMeasure );
|
bt->setDefaultAction( mActionMeasure );
|
||||||
mAttributesToolBar->addWidget( bt );
|
mAttributesToolBar->addWidget( bt );
|
||||||
|
connect( bt, SIGNAL( triggered( QAction * ) ), this, SLOT( toolButtonActionTriggered( QAction * ) ) );
|
||||||
|
|
||||||
mAttributesToolBar->addAction( mActionMapTips );
|
mAttributesToolBar->addAction( mActionMapTips );
|
||||||
mAttributesToolBar->addAction( mActionShowBookmarks );
|
mAttributesToolBar->addAction( mActionShowBookmarks );
|
||||||
@ -7026,3 +7028,12 @@ void QgisApp::completeInitialization()
|
|||||||
{
|
{
|
||||||
emit initializationCompleted();
|
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 );
|
void namSslErrors( QNetworkReply *reply, const QList<QSslError> &errors );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//! update default action of toolbutton
|
||||||
|
void toolButtonActionTriggered( QAction * );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
//! Handle state changes (WindowTitleChange)
|
//! Handle state changes (WindowTitleChange)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user