aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/tattoo/widget_base.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sherlock/tattoo/widget_base.cpp')
-rw-r--r--engines/sherlock/tattoo/widget_base.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/sherlock/tattoo/widget_base.cpp b/engines/sherlock/tattoo/widget_base.cpp
index 3a4e331f2d..ba4aee26f3 100644
--- a/engines/sherlock/tattoo/widget_base.cpp
+++ b/engines/sherlock/tattoo/widget_base.cpp
@@ -38,13 +38,12 @@ void WidgetBase::summonWindow() {
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
// Double-check that the same widget isn't added twice
- for (Common::List<WidgetBase *>::iterator i = ui._widgets.begin(); i != ui._widgets.end(); ++i) {
- if ((*i) == this)
- error("Tried to add a widget twice");
- }
+ if (ui._widgets.contains(this))
+ error("Tried to add a widget multiple times");
// Add widget to the screen
- ui._widgets.push_back(this);
+ if (!ui._fixedWidgets.contains(this))
+ ui._widgets.push_back(this);
_outsideMenu = false;
draw();