From 66188a108ad226711a4dbe0e83fde3c3e17d11c2 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek <1478678+Gymnasiast@users.noreply.github.com> Date: Tue, 25 Nov 2025 21:52:39 +0100 Subject: [PATCH] Close #25530: Allow cancelling wall drag without closing Scenery window (#25564) --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/Scenery.cpp | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 3bf6af5ff4..543e026249 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.4.30 (in development) ------------------------------------------------------------------------ - Improved: [#25529] The map selection grid no longer redraws every frame if it has not changed. +- Improved: [#25530] Wall dragging can now be cancelled without closing the Scenery window. - Fix: [#25524] The track construction arrow does not immediately change position when deleting track pieces. 0.4.29 (2025-11-22) diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index 2bff37e022..886dd28613 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -553,8 +553,20 @@ namespace OpenRCT2::Ui::Windows if (!isToolActive(WindowClass::scenery)) { - close(); - return; + if (_inDragMode) + { + removeProvisionalTilesFromMap(); + _provisionalTiles.clear(); + _inDragMode = false; + + ToolSet(*this, WIDX_SCENERY_BACKGROUND, Tool::arrow); + gInputFlags.set(InputFlag::unk6); + } + else + { + close(); + return; + } } if (gWindowSceneryEyedropperEnabled)