Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.

Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
This commit is contained in:
peter1138
2019-03-20 01:21:10 +00:00
committed by PeterN
parent e3c639a09f
commit 4da83d2f66
3 changed files with 17 additions and 5 deletions

View File

@@ -724,8 +724,8 @@ struct TooltipsWindow : public Window
* we are dragging the tool. Normal tooltips work with hover or rmb. */
switch (this->close_cond) {
case TCC_RIGHT_CLICK: if (!_right_button_down) delete this; break;
case TCC_LEFT_CLICK: if (!_left_button_down) delete this; break;
case TCC_HOVER: if (!_mouse_hovering) delete this; break;
case TCC_NONE: break;
}
}
};