Skip to content
Permalink
Browse files

[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.
  • Loading branch information
mbernasocchi authored and nyalldawson committed May 31, 2016
1 parent 9bb2fd1 commit 7ca15417094a99c47a416116efecf6ac65d012e2
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/app/qgisapp.cpp
@@ -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
@@ -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 )
{

0 comments on commit 7ca1541

Please sign in to comment.
You can’t perform that action at this time.