Makes it properly force an update of the filter via a dirty flag.

This commit is contained in:
Areloch 2017-10-26 20:11:35 -05:00
parent 9b83e47302
commit a36192ffd8
2 changed files with 6 additions and 1 deletions

View file

@ -68,6 +68,7 @@ GuiConsole::GuiConsole()
mDisplayErrors = true;
mDisplayWarnings = true;
mDisplayNormalMessages = true;
mFiltersDirty = true;
}
//-----------------------------------------------------------------------------
@ -108,7 +109,7 @@ void GuiConsole::refreshLogText()
Con::getLockLog(log, size);
if (mFilteredLog.size() != size)
if (mFilteredLog.size() != size || mFiltersDirty)
{
mFilteredLog.clear();
@ -221,6 +222,7 @@ void GuiConsole::setDisplayFilters(bool errors, bool warns, bool normal)
mDisplayErrors = errors;
mDisplayWarnings = warns;
mDisplayNormalMessages = normal;
mFiltersDirty = true;
refreshLogText();
@ -235,6 +237,8 @@ void GuiConsole::setDisplayFilters(bool errors, bool warns, bool normal)
setExtent(Point2I(mCellSize.x, mCellSize.y * mFilteredLog.size()));
scrollCellVisible(Point2I(0, mSize.y - 1));
mFiltersDirty = false;
}
DefineEngineMethod(GuiConsole, setDisplayFilters, void, (bool errors, bool warns, bool normal), (true, true, true),

View file

@ -42,6 +42,7 @@ class GuiConsole : public GuiArrayCtrl
bool mDisplayErrors;
bool mDisplayWarnings;
bool mDisplayNormalMessages;
bool mFiltersDirty;
S32 getMaxWidth(S32 startIndex, S32 endIndex);