From f54c64e3d8d8efaeb128b042e662a7d75a802707 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Mar 2023 11:11:04 +0100 Subject: editor: kill popup when loading game --- editor/app.cpp | 4 +--- editor/imgui.cpp | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/editor/app.cpp b/editor/app.cpp index 89f9ccf6..93fca78b 100644 --- a/editor/app.cpp +++ b/editor/app.cpp @@ -84,9 +84,7 @@ void app::reset_world(struct world&& w_) _editor.on_release(); _editor.clear_selection(); - inspectors.clear(); - _pending_popup = false; - _popup_target = {}; + kill_popups(true); clear_keys(); cursor = {}; diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 6ac6e7fa..9700a8f7 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -168,9 +168,7 @@ void app::kill_popups(bool hard) ImGui::CloseCurrentPopup(); if (hard) - { inspectors.clear(); - } ImGui::FocusWindow(nullptr); } -- cgit v1.2.3