GUI: Fix caching of Edit Game dialog layout

This commit is contained in:
DivyamAhuja 2021-04-08 19:34:33 +05:30 committed by Eugene Sandulenko
parent 4ee2bdb6a7
commit 3891055214

View File

@ -954,9 +954,9 @@ void OptionsContainerWidget::reflowLayout() {
Widget::reflowLayout();
if (!_dialogLayout.empty()) {
if (!g_gui.xmlEval()->hasDialog(_dialogLayout)) {
defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
}
// Since different engines have different number of options,
// we have to create it every time.
defineLayout(*g_gui.xmlEval(), _dialogLayout, _name);
if (!_scrollContainer) {
g_gui.xmlEval()->reflowDialogLayout(_dialogLayout, _firstWidget);