From 32431836801c0cb4729a2bd74f482da632594601 Mon Sep 17 00:00:00 2001 From: Michael Steenbeek Date: Mon, 6 Jun 2022 00:11:29 +0200 Subject: [PATCH] Fix #17187: Text input window does not resize correctly window_set_resize() already invalidates, so no need to call it twice. Co-authored-by: guljam --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/TextInput.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 77ca7c0b6f..18e1e5fdc6 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -26,6 +26,7 @@ - Fix: [#17099] Object selection thumbnail box is one pixel too tall. - Fix: [#17104] Changing map size does not invalidate park size. - Fix: [#17157] Crash when browsing “Up” to folder with CJK characters in its name. +- Fix: [#17187] Text input window does not resize correctly. - Fix: [#17197] Segfault when extracting files from the GOG installer. - Fix: [#17205] Map generator sometimes crashes when not all standard terrain objects are available. - Fix: [#17221] Object ghosts and tooltips follow invisible cursor when moving the viewport by right-click dragging. diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index 2292969498..9e275fa386 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -170,8 +170,7 @@ public: int32_t newHeight = CalculateWindowHeight(_buffer.data()); if (newHeight != height) { - Invalidate(); - window_set_resize(this, WW, height, WW, height); + window_set_resize(this, WW, newHeight, WW, newHeight); } widgets[WIDX_OKAY].top = newHeight - 22;