Fix flickering of viewport hover tooltips in fast-forward mode

This commit is contained in:
Jonathan G Rennison
2019-02-16 18:59:38 +00:00
parent ac5b4b9454
commit d90e7d2996
2 changed files with 2 additions and 2 deletions

View File

@@ -469,7 +469,7 @@ struct MainWindow : Window
virtual void OnMouseOver(Point pt, int widget) virtual void OnMouseOver(Point pt, int widget)
{ {
if (pt.x != -1 && _game_mode != GM_MENU) { if (pt.x != -1 && _game_mode != GM_MENU && _mouse_hovering) {
/* Show tooltip with last month production or town name */ /* Show tooltip with last month production or town name */
const Point p = GetTileBelowCursor(); const Point p = GetTileBelowCursor();
const TileIndex tile = TileVirtXY(p.x, p.y); const TileIndex tile = TileVirtXY(p.x, p.y);

View File

@@ -155,7 +155,7 @@ public:
virtual void OnMouseOver(Point pt, int widget) virtual void OnMouseOver(Point pt, int widget)
{ {
if (pt.x != -1) { if (pt.x != -1 && _mouse_hovering) {
/* Show tooltip with last month production or town name */ /* Show tooltip with last month production or town name */
const Point p = GetTileBelowCursor(); const Point p = GetTileBelowCursor();
const TileIndex tile = TileVirtXY(p.x, p.y); const TileIndex tile = TileVirtXY(p.x, p.y);