mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-12 07:11:27 +00:00
Add missing workaround for a MyGUI visibility bug
This commit is contained in:
parent
aeed99ca2c
commit
591fa9b700
2 changed files with 9 additions and 0 deletions
|
@ -58,3 +58,4 @@ namespace LuaUi
|
||||||
mElement = nullptr;
|
mElement = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,10 @@ namespace LuaUi
|
||||||
ext->mParent = this;
|
ext->mParent = this;
|
||||||
ext->mTemplateChild = false;
|
ext->mTemplateChild = false;
|
||||||
ext->widget()->attachToWidget(mSlot->widget());
|
ext->widget()->attachToWidget(mSlot->widget());
|
||||||
|
// workaround for MyGUI bug
|
||||||
|
// parent visibility doesn't affect added children
|
||||||
|
ext->widget()->setVisible(!ext->widget()->getVisible());
|
||||||
|
ext->widget()->setVisible(!ext->widget()->getVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WidgetExtension::attachTemplate(WidgetExtension* ext)
|
void WidgetExtension::attachTemplate(WidgetExtension* ext)
|
||||||
|
@ -103,6 +107,10 @@ namespace LuaUi
|
||||||
ext->mParent = this;
|
ext->mParent = this;
|
||||||
ext->mTemplateChild = true;
|
ext->mTemplateChild = true;
|
||||||
ext->widget()->attachToWidget(widget());
|
ext->widget()->attachToWidget(widget());
|
||||||
|
// workaround for MyGUI bug
|
||||||
|
// parent visibility doesn't affect added children
|
||||||
|
ext->widget()->setVisible(!ext->widget()->getVisible());
|
||||||
|
ext->widget()->setVisible(!ext->widget()->getVisible());
|
||||||
}
|
}
|
||||||
|
|
||||||
WidgetExtension* WidgetExtension::findDeep(std::string_view flagName)
|
WidgetExtension* WidgetExtension::findDeep(std::string_view flagName)
|
||||||
|
|
Loading…
Reference in a new issue