mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-22 15:23:01 +01:00
Ignore dead windows to determine insertion position
This commit is contained in:
@@ -244,6 +244,8 @@ WindowBase* WindowCreate(
|
|||||||
{
|
{
|
||||||
for (auto it = g_window_list.begin(); it != g_window_list.end(); it++)
|
for (auto it = g_window_list.begin(); it != g_window_list.end(); it++)
|
||||||
{
|
{
|
||||||
|
if ((*it)->flags & WF_DEAD)
|
||||||
|
continue;
|
||||||
if (!((*it)->flags & WF_STICK_TO_BACK))
|
if (!((*it)->flags & WF_STICK_TO_BACK))
|
||||||
{
|
{
|
||||||
itDestPos = it;
|
itDestPos = it;
|
||||||
@@ -254,6 +256,8 @@ WindowBase* WindowCreate(
|
|||||||
{
|
{
|
||||||
for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++)
|
for (auto it = g_window_list.rbegin(); it != g_window_list.rend(); it++)
|
||||||
{
|
{
|
||||||
|
if ((*it)->flags & WF_DEAD)
|
||||||
|
continue;
|
||||||
if (!((*it)->flags & WF_STICK_TO_FRONT))
|
if (!((*it)->flags & WF_STICK_TO_FRONT))
|
||||||
{
|
{
|
||||||
itDestPos = it.base();
|
itDestPos = it.base();
|
||||||
|
|||||||
Reference in New Issue
Block a user