Alternate fix for GuiTreeView

Adding `mFlags.set(RebuildVisible)` to `GuiTreeView::onWake()` fixes the problem where the tree is not drawn correctly when nodes are expanded in the TorqueScript `GuiTreeView::onWake()` callback function.
This commit is contained in:
Scott Przybylski 2014-08-14 21:52:48 -07:00
parent e21a0876b6
commit 2987681220

View file

@ -1237,7 +1237,7 @@ void GuiTreeViewCtrl::buildVisibleTree(bool bForceFullUpdate)
bForceFullUpdate = true;
// Update the flags.
mFlags.set(RebuildVisible);
mFlags.clear(RebuildVisible);
// build the root items
Item *traverse = mRoot;
@ -1785,6 +1785,8 @@ bool GuiTreeViewCtrl::onWake()
// make sure it's big enough for both bitmap AND font...
mItemHeight = getMax((S32)mFont->getHeight(), (S32)mProfile->mBitmapArrayRects[0].extent.y);
}
mFlags.set(RebuildVisible);
return true;
}