Skip to content

Commit

Permalink
fix course select crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
jupahe64 committed Dec 5, 2023
1 parent 9f1e50e commit 0cd3b5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Fushigi/ui/modal/PopupModalHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void DrawHostedModals()
Vector2 center = ImGui.GetMainViewport().GetCenter();
ImGui.SetNextWindowPos(center, ImGuiCond.Always, new Vector2(0.5f, 0.5f));
if(info.MinWindowSize.TryGetValue(out Vector2 minWindowSize))
ImGui.PushStyleVar(ImGuiStyleVar.WindowMinSize, minWindowSize);
ImGui.SetNextWindowSizeConstraints(minWindowSize, ImGui.GetWindowViewport().Size);

if(!shouldClose && !ImGui.IsPopupOpen(info.Id))
ImGui.OpenPopup(info.Id);
Expand All @@ -110,11 +110,8 @@ public void DrawHostedModals()
if (!ImGui.BeginPopupModal(info.Id, ref open, info.WindowFlags))
{
methods.Cancel();
if (info.MinWindowSize is not null)
ImGui.PopStyleVar();
continue;
}
ImGui.PopStyleVar();

methods.Execute();

Expand Down

0 comments on commit 0cd3b5b

Please sign in to comment.