Skip to content

Commit

Permalink
Reload limits window when select another map
Browse files Browse the repository at this point in the history
  • Loading branch information
UnrealKaraulov committed Nov 13, 2024
1 parent 35dc184 commit 6105b5d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/editor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -9865,7 +9874,6 @@ void Gui::drawLimits()

void Gui::drawLimitTab(Bsp* map, int sortMode)
{

int maxCount = 0;
const char* countName = "None";
switch (sortMode)
Expand Down

0 comments on commit 6105b5d

Please sign in to comment.