From cd07fd5d4eeb5398a89861c04d4dea19c5927a52 Mon Sep 17 00:00:00 2001 From: duncanspumpkin Date: Sun, 15 Nov 2015 09:12:19 +0000 Subject: [PATCH] Fix #1565. Construction window now checks to see if it has control of tool before canceling it --- src/windows/ride_construction.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index b3dae4b8de..f6704d2175 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -575,8 +575,11 @@ static void window_ride_construction_close(rct_window *w) RCT2_GLOBAL(RCT2_ADDRESS_MAP_SELECTION_FLAGS, uint16) &= ~(1 << 1); // In order to cancel the yellow arrow correctly the - // selection tool should be cancelled. - tool_cancel(); + // selection tool should be cancelled. Don't do a tool cancel if + // another window has already taken control of tool. + if (w->classification == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWCLASS, rct_windowclass) && + w->number == RCT2_GLOBAL(RCT2_ADDRESS_TOOL_WINDOWNUMBER, rct_windownumber)) + tool_cancel(); hide_gridlines();