Skip to content

Commit

Permalink
[FEATURE] persist Maptip visibility across sessions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mbernasocchi authored and nyalldawson committed Jun 2, 2016
1 parent 9bb2fd1 commit 7ca1541
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -922,6 +922,12 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh
QgsMessageLog::logMessage( tr( "QGIS Ready!" ), QString::null, QgsMessageLog::INFO );

mMapTipsVisible = false;
// This turns on the map tip if they where active in the last session
if ( settings.value( "/qgis/enableMapTips", false ).toBool() )
{
mActionMapTips->trigger();
}

mTrustedMacros = false;

// setup drag drop
Expand Down Expand Up @@ -7430,6 +7436,9 @@ void QgisApp::canvasRefreshFinished()
void QgisApp::toggleMapTips()
{
mMapTipsVisible = !mMapTipsVisible;
// Store if maptips are active
QSettings().setValue( "/qgis/enableMapTips", mMapTipsVisible );

// if off, stop the timer
if ( !mMapTipsVisible )
{
Expand Down

0 comments on commit 7ca1541

Please sign in to comment.