mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 09:04:38 +00:00
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:
parent
e21a0876b6
commit
2987681220
1 changed files with 3 additions and 1 deletions
|
|
@ -1237,7 +1237,7 @@ void GuiTreeViewCtrl::buildVisibleTree(bool bForceFullUpdate)
|
||||||
bForceFullUpdate = true;
|
bForceFullUpdate = true;
|
||||||
|
|
||||||
// Update the flags.
|
// Update the flags.
|
||||||
mFlags.set(RebuildVisible);
|
mFlags.clear(RebuildVisible);
|
||||||
|
|
||||||
// build the root items
|
// build the root items
|
||||||
Item *traverse = mRoot;
|
Item *traverse = mRoot;
|
||||||
|
|
@ -1786,6 +1786,8 @@ bool GuiTreeViewCtrl::onWake()
|
||||||
mItemHeight = getMax((S32)mFont->getHeight(), (S32)mProfile->mBitmapArrayRects[0].extent.y);
|
mItemHeight = getMax((S32)mFont->getHeight(), (S32)mProfile->mBitmapArrayRects[0].extent.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mFlags.set(RebuildVisible);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue