Skip to content

Commit 7ca1541

Browse files
mbernasocchinyalldawson
authored andcommittedJun 2, 2016
[FEATURE] persist Maptip visibility across sessions
This feature allows to store if a user had activated Maptips and turn it on in a following QGIS session. Maptips are non intrusive, so this shouldn't be disturbing.
1 parent 9bb2fd1 commit 7ca1541

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,12 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
922922
QgsMessageLog::logMessage( tr( "QGIS Ready!" ), QString::null, QgsMessageLog::INFO );
923923

924924
mMapTipsVisible = false;
925+
// This turns on the map tip if they where active in the last session
926+
if ( settings.value( "/qgis/enableMapTips", false ).toBool() )
927+
{
928+
mActionMapTips->trigger();
929+
}
930+
925931
mTrustedMacros = false;
926932

927933
// setup drag drop
@@ -7430,6 +7436,9 @@ void QgisApp::canvasRefreshFinished()
74307436
void QgisApp::toggleMapTips()
74317437
{
74327438
mMapTipsVisible = !mMapTipsVisible;
7439+
// Store if maptips are active
7440+
QSettings().setValue( "/qgis/enableMapTips", mMapTipsVisible );
7441+
74337442
// if off, stop the timer
74347443
if ( !mMapTipsVisible )
74357444
{

0 commit comments

Comments
 (0)
Please sign in to comment.