@@ -88,13 +88,13 @@ QgsGpsToolBar::QgsGpsToolBar( QgsAppGpsConnection *connection, QgsMapCanvas *can
88
88
mDestinationLayerMenu = new QMenu ( this );
89
89
connect ( mDestinationLayerMenu , &QMenu::aboutToShow, this , &QgsGpsToolBar::destinationMenuAboutToShow );
90
90
91
- QToolButton *destinationLayerButton = new QToolButton ();
92
- destinationLayerButton ->setAutoRaise ( true );
93
- destinationLayerButton ->setToolTip ( tr ( " Set destination layer for GPS digitized features" ) );
94
- destinationLayerButton ->setMenu ( mDestinationLayerMenu );
95
- destinationLayerButton ->setPopupMode ( QToolButton::InstantPopup );
96
- destinationLayerButton ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /mActionOptions.svg" ) ) );
97
- addWidget ( destinationLayerButton );
91
+ mDestinationLayerButton = new QToolButton ();
92
+ mDestinationLayerButton ->setAutoRaise ( true );
93
+ mDestinationLayerButton ->setToolTip ( tr ( " Set destination layer for GPS digitized features" ) );
94
+ mDestinationLayerButton ->setMenu ( mDestinationLayerMenu );
95
+ mDestinationLayerButton ->setPopupMode ( QToolButton::InstantPopup );
96
+ mDestinationLayerButton ->setIcon ( QgsApplication::getThemeIcon ( QStringLiteral ( " /mActionOptions.svg" ) ) );
97
+ addWidget ( mDestinationLayerButton );
98
98
99
99
mAddTrackVertexAction = new QAction ( tr ( " Add Track Vertex" ), this );
100
100
mAddTrackVertexAction ->setToolTip ( tr ( " Add vertex to GPS track using current GPS location" ) );
@@ -210,7 +210,11 @@ void QgsGpsToolBar::destinationLayerChanged( QgsVectorLayer *vlayer )
210
210
{
211
211
if ( vlayer )
212
212
{
213
-
213
+ mDestinationLayerButton ->setToolTip ( tr ( " GPS digitized features will be stored in %1" ).arg ( vlayer->name () ) );
214
+ }
215
+ else
216
+ {
217
+ mDestinationLayerButton ->setToolTip ( tr ( " Set destination layer for GPS digitized features" ) );
214
218
}
215
219
216
220
if ( !( vlayer && vlayer->isValid () ) )
0 commit comments