Skip to content

Commit

Permalink
#5231: Fix PatchInspector constantly updating after first update() ca…
Browse files Browse the repository at this point in the history
…ll due to the _updateNeeded flag not being cleared.
  • Loading branch information
codereader committed Jun 28, 2020
1 parent 7efa99a commit 7782291
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions radiant/ui/patch/PatchInspector.cpp
Expand Up @@ -16,6 +16,7 @@
#include "registry/Widgets.h"
#include "selectionlib.h"
#include "wxutil/ControlButton.h"
#include "util/ScopedBoolLock.h"

#include <functional>

Expand Down Expand Up @@ -199,7 +200,9 @@ void PatchInspector::queueUpdate()

void PatchInspector::update()
{
_updateActive = true;
util::ScopedBoolLock lock(_updateActive);

_updateNeeded = false;

auto patch = _patch.lock();

Expand All @@ -217,8 +220,6 @@ void PatchInspector::update()
// Load the data from the currently selected vertex
loadControlVertex();
}

_updateActive = false;
}

void PatchInspector::loadControlVertex()
Expand Down

0 comments on commit 7782291

Please sign in to comment.