summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2011-09-18 02:39:48 +0800
committerErik Schilling <ablu.erikschilling@googlemail.com>2011-09-29 01:22:43 +0800
commit48fb6a6a345ae091c78a119795f7716102126241 (patch)
tree731162c4616e769b05761f6421d8a28a8bb5b2b4 /src/gui/widgets
parentb912a0c991cb0b1e02009d6bb2c9dffd2fa84d3a (diff)
downloadmana-48fb6a6a345ae091c78a119795f7716102126241.tar.gz
mana-48fb6a6a345ae091c78a119795f7716102126241.tar.bz2
mana-48fb6a6a345ae091c78a119795f7716102126241.tar.xz
mana-48fb6a6a345ae091c78a119795f7716102126241.zip
Fixed item popup still visible after closing inventory window.
Reviewed-by: Bertram.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/itemcontainer.cpp5
-rw-r--r--src/gui/widgets/itemcontainer.h2
-rw-r--r--src/gui/widgets/window.h2
3 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 2cd0fa23..546a16d2 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -228,6 +228,11 @@ void ItemContainer::distributeValueChangedEvent()
}
}
+void ItemContainer::hidePopup()
+{
+ mItemPopup->setVisible(false);
+}
+
void ItemContainer::keyPressed(gcn::KeyEvent &event)
{
/*switch (event.getKey().getValue())
diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h
index ca21ad3f..4d5afde2 100644
--- a/src/gui/widgets/itemcontainer.h
+++ b/src/gui/widgets/itemcontainer.h
@@ -62,6 +62,8 @@ class ItemContainer : public gcn::Widget,
virtual ~ItemContainer();
+ void hidePopup();
+
/**
* Necessary for checking how full the inventory is.
*/
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index e62f4d92..64631287 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -105,7 +105,7 @@ class Window : public gcn::Window, gcn::WidgetListener
/**
* Called whenever the widget is hidden.
*/
- virtual void widgetHidden(const gcn::Event& event);
+ virtual void widgetHidden(const gcn::Event &event);
/**
* Sets whether or not the window has a close button.