mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-28 23:39:43 +00:00
Merge branch 'fix_destroying_new_elements' into 'master'
Don't destroy root widget for new elements See merge request OpenMW/openmw!3947
This commit is contained in:
commit
2764d8ceff
1 changed files with 7 additions and 4 deletions
|
@ -313,11 +313,14 @@ namespace LuaUi
|
||||||
{
|
{
|
||||||
if (mState != Destroyed)
|
if (mState != Destroyed)
|
||||||
{
|
{
|
||||||
|
if (mState != New)
|
||||||
|
{
|
||||||
|
assert(mRoot);
|
||||||
destroyRoot(mRoot);
|
destroyRoot(mRoot);
|
||||||
mRoot = nullptr;
|
mRoot = nullptr;
|
||||||
if (mState != New)
|
}
|
||||||
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
|
mLayout = sol::make_object(mLayout.lua_state(), sol::nil);
|
||||||
|
}
|
||||||
mState = Destroyed;
|
mState = Destroyed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue