From 6105b5df00258f91e14923d7e7f1578c8ead38bb Mon Sep 17 00:00:00 2001 From: Unreal Karaulov Date: Wed, 13 Nov 2024 08:59:27 +0300 Subject: [PATCH] Reload limits window when select another map --- src/editor/Gui.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index 0a755705..7f682f56 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -9752,6 +9752,15 @@ void Gui::drawLimits() Bsp* map = app->getSelectedMap(); std::string title = map ? "Limits - " + map->bsp_name : "Limits"; + static Bsp* oldMap = NULL; + + if (map != oldMap) + { + reloadLimits(); + oldMap = map; + } + + if (ImGui::Begin(fmt::format("{}###LIMITS_WIDGET", title).c_str(), &showLimitsWidget)) { if (!map) @@ -9865,7 +9874,6 @@ void Gui::drawLimits() void Gui::drawLimitTab(Bsp* map, int sortMode) { - int maxCount = 0; const char* countName = "None"; switch (sortMode)