Commit 125c58df authored by bitplane's avatar bitplane

fixed a bug in CGUIEnvironment::clear() reported by Jacky_J

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@718 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4e79c0e2
......@@ -159,7 +159,8 @@ GUI:
- XML bitmap fonts now load textures from the XML file directory rather than the current one.
- Fixed a small bug with click areas in combo boxes.
- Fixed a bug in clear() when an element was hovered or had focus
GUI Editor:
......
......@@ -272,6 +272,20 @@ IOSOperator* CGUIEnvironment::getOSOperator()
//! clear all GUI elements
void CGUIEnvironment::clear()
{
// Remove the focus
if (Focus)
{
Focus->drop();
Focus = 0;
}
if (Hovered && Hovered != this)
{
Hovered->drop();
Hovered = 0;
}
// get the root's children in case the root changes in future
const core::list<IGUIElement*>& children = getRootGUIElement()->getChildren();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment