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 @@ -11653,20 +11653,24 @@ void QgisApp::removeMapToolMessage()
11653
11653
// Show the maptip using tooltip
11654
11654
void QgisApp::showMapTip ()
11655
11655
{
11656
- QPoint myPointerPos = mMapCanvas ->mouseLastXY ();
11657
-
11658
- // Make sure there is an active layer before proceeding
11659
- QgsMapLayer *mypLayer = mMapCanvas ->currentLayer ();
11660
- if ( mypLayer )
11656
+ // Only show maptips if the mouse is still over the map canvas when timer is triggered
11657
+ if ( mMapCanvas ->underMouse () )
11661
11658
{
11662
- // QgsDebugMsg("Current layer for maptip display is: " + mypLayer->source());
11663
- // only process vector layers
11664
- if ( mypLayer->type () == QgsMapLayer::VectorLayer )
11659
+ QPoint myPointerPos = mMapCanvas ->mouseLastXY ();
11660
+
11661
+ // Make sure there is an active layer before proceeding
11662
+ QgsMapLayer *mypLayer = mMapCanvas ->currentLayer ();
11663
+ if ( mypLayer )
11665
11664
{
11666
- // Show the maptip if the maptips button is depressed
11667
- if ( mMapTipsVisible )
11665
+ // QgsDebugMsg("Current layer for maptip display is: " + mypLayer->source());
11666
+ // only process vector layers
11667
+ if ( mypLayer->type () == QgsMapLayer::VectorLayer )
11668
11668
{
11669
- mpMaptip->showMapTip ( mypLayer, mLastMapPosition , myPointerPos, mMapCanvas );
11669
+ // Show the maptip if the maptips button is depressed
11670
+ if ( mMapTipsVisible )
11671
+ {
11672
+ mpMaptip->showMapTip ( mypLayer, mLastMapPosition , myPointerPos, mMapCanvas );
11673
+ }
11670
11674
}
11671
11675
}
11672
11676
}
You can’t perform that action at this time.
0 commit comments