File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -11739,20 +11739,24 @@ void QgisApp::removeMapToolMessage()
11739
11739
// Show the maptip using tooltip
11740
11740
void QgisApp::showMapTip ()
11741
11741
{
11742
- QPoint myPointerPos = mMapCanvas ->mouseLastXY ();
11743
-
11744
- // Make sure there is an active layer before proceeding
11745
- QgsMapLayer *mypLayer = mMapCanvas ->currentLayer ();
11746
- if ( mypLayer )
11742
+ // Only show maptips if the mouse is still over the map canvas when timer is triggered
11743
+ if ( mMapCanvas ->underMouse () )
11747
11744
{
11748
- // QgsDebugMsg("Current layer for maptip display is: " + mypLayer->source());
11749
- // only process vector layers
11750
- if ( mypLayer->type () == QgsMapLayer::VectorLayer )
11745
+ QPoint myPointerPos = mMapCanvas ->mouseLastXY ();
11746
+
11747
+ // Make sure there is an active layer before proceeding
11748
+ QgsMapLayer *mypLayer = mMapCanvas ->currentLayer ();
11749
+ if ( mypLayer )
11751
11750
{
11752
- // Show the maptip if the maptips button is depressed
11753
- if ( mMapTipsVisible )
11751
+ // QgsDebugMsg("Current layer for maptip display is: " + mypLayer->source());
11752
+ // only process vector layers
11753
+ if ( mypLayer->type () == QgsMapLayer::VectorLayer )
11754
11754
{
11755
- mpMaptip->showMapTip ( mypLayer, mLastMapPosition , myPointerPos, mMapCanvas );
11755
+ // Show the maptip if the maptips button is depressed
11756
+ if ( mMapTipsVisible )
11757
+ {
11758
+ mpMaptip->showMapTip ( mypLayer, mLastMapPosition , myPointerPos, mMapCanvas );
11759
+ }
11756
11760
}
11757
11761
}
11758
11762
}
You can’t perform that action at this time.
0 commit comments