mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Makes it properly force an update of the filter via a dirty flag.
This commit is contained in:
parent
9b83e47302
commit
a36192ffd8
2 changed files with 6 additions and 1 deletions
|
|
@ -68,6 +68,7 @@ GuiConsole::GuiConsole()
|
||||||
mDisplayErrors = true;
|
mDisplayErrors = true;
|
||||||
mDisplayWarnings = true;
|
mDisplayWarnings = true;
|
||||||
mDisplayNormalMessages = true;
|
mDisplayNormalMessages = true;
|
||||||
|
mFiltersDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -108,7 +109,7 @@ void GuiConsole::refreshLogText()
|
||||||
|
|
||||||
Con::getLockLog(log, size);
|
Con::getLockLog(log, size);
|
||||||
|
|
||||||
if (mFilteredLog.size() != size)
|
if (mFilteredLog.size() != size || mFiltersDirty)
|
||||||
{
|
{
|
||||||
mFilteredLog.clear();
|
mFilteredLog.clear();
|
||||||
|
|
||||||
|
|
@ -221,6 +222,7 @@ void GuiConsole::setDisplayFilters(bool errors, bool warns, bool normal)
|
||||||
mDisplayErrors = errors;
|
mDisplayErrors = errors;
|
||||||
mDisplayWarnings = warns;
|
mDisplayWarnings = warns;
|
||||||
mDisplayNormalMessages = normal;
|
mDisplayNormalMessages = normal;
|
||||||
|
mFiltersDirty = true;
|
||||||
|
|
||||||
refreshLogText();
|
refreshLogText();
|
||||||
|
|
||||||
|
|
@ -235,6 +237,8 @@ void GuiConsole::setDisplayFilters(bool errors, bool warns, bool normal)
|
||||||
setExtent(Point2I(mCellSize.x, mCellSize.y * mFilteredLog.size()));
|
setExtent(Point2I(mCellSize.x, mCellSize.y * mFilteredLog.size()));
|
||||||
|
|
||||||
scrollCellVisible(Point2I(0, mSize.y - 1));
|
scrollCellVisible(Point2I(0, mSize.y - 1));
|
||||||
|
|
||||||
|
mFiltersDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DefineEngineMethod(GuiConsole, setDisplayFilters, void, (bool errors, bool warns, bool normal), (true, true, true),
|
DefineEngineMethod(GuiConsole, setDisplayFilters, void, (bool errors, bool warns, bool normal), (true, true, true),
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ class GuiConsole : public GuiArrayCtrl
|
||||||
bool mDisplayErrors;
|
bool mDisplayErrors;
|
||||||
bool mDisplayWarnings;
|
bool mDisplayWarnings;
|
||||||
bool mDisplayNormalMessages;
|
bool mDisplayNormalMessages;
|
||||||
|
bool mFiltersDirty;
|
||||||
|
|
||||||
S32 getMaxWidth(S32 startIndex, S32 endIndex);
|
S32 getMaxWidth(S32 startIndex, S32 endIndex);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue