This could happen when trying to open a ride, which does not have
entrance or exit, from the ride list window. The `OnClose` handler would
want to open a window for placing said elements causing invalidation of
the window list.
20ac77904b/src/openrct2-ui/windows/RideConstruction.cpp (L324)
This removes the possibility of a race condition where a window is added to the window list but OnOpen has not been called. Many windows use OnOpen to set up required members so if say OnDraw is called it may use uninitialized members. For an example see ProgressWindow.
* Split FileBrowser and OverwritePrompt from LoadSave unit
* Introduce FileBrowser::OpenPreferred
* Refactor FileBrowser::GetTitleStringId into its own function
* Rewrite OpenSystemFileBrowser using designated initalisers
* Rename dateModified, dateFormatted, timeFormatted properties
* Clean up internal localisation header includes
* Remove some external localisation includes
* Remove dependency on FormatCodes.h from InteractiveConsole.h
* Reduce Formatter.h, Localisation.Date.h includes
* Move WindowInvalidate and WidgetInvalidate families into WindowManager
* Use InvalidateWidget shorthand in more places
* Cut back on UiContext includes
* Cut back on Window.h includes
* Remove outdated parameter comments
* Replace WindowClose() calls with Close method calls where possible
* Move WindowClose family into WindowManager
* Remove UpdateSceneryGroupIndexes hack
* Refactor windows to not share widget state
* First half of refactoring all the windows
* Refactor the remaining windows, compiles but has issues
* Fix drawing only every second widget
* Remove the need of an terminating widget
* Address WidgetIndex signedness issues; use kWidgetIndexNull more
* Address constexpr issue with Widget content union
* Fix tabs in scenery window
* Fix tabs in object selection window
* Adjust custom widget index for CustomTool events
* Use STR_NONE for default tooltip initialisation
* Adjustment for mingw compiler
* Fix bottom toolbar using the widget declaration not instance
* Remove pointless code in Guest window, handled by SetPage
* Prevent out of bounds crash
* Move scroll widgets initialization to SetPage in Cheats window
* Remove special logic in Options window
* Remove special logic in Park window
* Remove special logic for Player window
* Remove special logic for Research window
* Remove special logic for Ride window
* Remove special logic for Staff window
* Remove special logic for Finances window
* Remove special logic for MapGen window
* Remove special logic for editor objective options window
* Remove special logic for editor scenario options window
* Fix widgets not being set since page is initialized to 0
* Remove more redundant code
* Fix remaining access to widget declarations
* Remove unused variable
* Fix editor object selection tabs on successive windows
---------
Co-authored-by: Aaron van Geffen <aaron@aaronweb.net>