diff options
Diffstat (limited to 'gui/ThemeEval.cpp')
-rw-r--r-- | gui/ThemeEval.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gui/ThemeEval.cpp b/gui/ThemeEval.cpp index fe520eb80b..ec866cc626 100644 --- a/gui/ThemeEval.cpp +++ b/gui/ThemeEval.cpp @@ -178,11 +178,14 @@ void ThemeLayoutHorizontal::reflowLayout() { _w += _children[i]->getWidth() + _spacing; } - _h = MAX(_h, (int16)(_children[i]->getHeight() + _paddingTop + _paddingBottom)); } } +ThemeEval::~ThemeEval() { + reset(); +} + void ThemeEval::buildBuiltinVars() { _builtin["kThumbnailWidth"] = kThumbnailWidth; _builtin["kThumbnailHeight"] = kThumbnailHeight1; @@ -236,6 +239,9 @@ void ThemeEval::addDialog(const Common::String &name, const Common::String &over if (!layout) error("Error when loading dialog position for '%s'", overlays.c_str()); + + if (_layouts.contains(name)) + delete _layouts[name]; _layouts[name] = layout; |