Skip to content

Commit

Permalink
Merge pull request OpenRCT2#21389 from ZehMatt/error-update-1
Browse files Browse the repository at this point in the history
Don't close the error window if the new error will not show
  • Loading branch information
ZehMatt committed Feb 13, 2024
2 parents 5ed5fec + c24657a commit 5ac347e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/openrct2-ui/windows/Error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ class ErrorWindow final : public Window

WindowBase* WindowErrorOpen(std::string_view title, std::string_view message)
{
WindowCloseByClass(WindowClass::Error);

std::string buffer = "{BLACK}";
buffer.append(title);

Expand All @@ -137,6 +135,9 @@ WindowBase* WindowErrorOpen(std::string_view title, std::string_view message)
return nullptr;
}

// Close any existing error windows if they exist.
WindowCloseByClass(WindowClass::Error);

int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium);
width = std::clamp(width, 64, 196);

Expand Down

0 comments on commit 5ac347e

Please sign in to comment.