Plans: Fix adding plan lines in viewport map mode

This commit is contained in:
Jonathan G Rennison
2020-09-29 17:48:15 +01:00
parent 3b47b7b091
commit 38ebad6123
3 changed files with 6 additions and 3 deletions

View File

@@ -4060,7 +4060,7 @@ bool HandleViewportDoubleClicked(Window *w, int x, int y)
bool HandleViewportClicked(const Viewport *vp, int x, int y, bool double_click)
{
/* No click in smallmap mode except for plan making. */
if (vp->zoom >= ZOOM_LVL_DRAW_MAP && !(_thd.place_mode == HT_POINT && _thd.select_proc == DDSP_DRAW_PLANLINE)) return true;
if (vp->zoom >= ZOOM_LVL_DRAW_MAP && !(_thd.place_mode & HT_MAP)) return true;
const Vehicle *v = CheckClickOnVehicle(vp, x, y);
@@ -4086,6 +4086,8 @@ bool HandleViewportClicked(const Viewport *vp, int x, int y, bool double_click)
return true;
}
if (vp->zoom >= ZOOM_LVL_DRAW_MAP) return true;
if (CheckClickOnViewportSign(vp, x, y)) return true;
bool result = CheckClickOnLandscape(vp, x, y);