mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 12:09:53 +00:00
Don't destroy root widget for new elements
This commit is contained in:
parent
dce0a9e11e
commit
b12f98db98
1 changed files with 7 additions and 4 deletions
|
@ -313,11 +313,14 @@ namespace LuaUi
|
|||
{
|
||||
if (mState != Destroyed)
|
||||
{
|
||||
destroyRoot(mRoot);
|
||||
mRoot = nullptr;
|
||||
if (mState != New)
|
||||
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
|
||||
mState = Destroyed;
|
||||
{
|
||||
assert(mRoot);
|
||||
destroyRoot(mRoot);
|
||||
mRoot = nullptr;
|
||||
}
|
||||
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
|
||||
}
|
||||
mState = Destroyed;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue