From f9a7d98b21e6b1d9c50529f77af2e94ff2cb7ac4 Mon Sep 17 00:00:00 2001 From: mrmbernardi Date: Sat, 20 Jul 2024 23:14:37 +1000 Subject: [PATCH] Fix #22333: Tile inspector closes other tool windows (#22341) --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/TileInspector.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 07ab8e09c6..126415837f 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -15,6 +15,7 @@ - Fix: [#22284] Unrated rides cause high amount of nausea. - Fix: [#22304] Graphs don't draw lines on the left edge of the screen. - Fix: [#22318] Water sparkles are missing if transparent water is enabled without RCT1 linked. +- Fix: [#22333] Tile inspector closes other tool windows. 0.4.12 (2024-07-07) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 2525c44552..b04b978637 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -721,7 +721,8 @@ static uint64_t PageDisabledWidgets[] = { void OnClose() override { - ToolCancel(); + if (gCurrentToolWidget.window_classification == WindowClass::TileInspector) + ToolCancel(); TileElement* const elem = OpenRCT2::TileInspector::GetSelectedElement(); if (elem != nullptr) {