summaryrefslogtreecommitdiff
path: root/src/gui/buysell.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-02-23 13:19:31 -0700
committerJared Adams <jaxad0127@gmail.com>2009-02-23 13:19:31 -0700
commitc54b987a4e4d28d35e8bafb03e1dba33b5fda4ab (patch)
treec3a69432b48708d351a02a7232acddee6a8ca6f5 /src/gui/buysell.cpp
parente01a1776f20a499003ae976e4b145a9c85f6a014 (diff)
downloadmana-client-c54b987a4e4d28d35e8bafb03e1dba33b5fda4ab.tar.gz
mana-client-c54b987a4e4d28d35e8bafb03e1dba33b5fda4ab.tar.bz2
mana-client-c54b987a4e4d28d35e8bafb03e1dba33b5fda4ab.tar.xz
mana-client-c54b987a4e4d28d35e8bafb03e1dba33b5fda4ab.zip
Hide the buy/sell dialogs when there is no NPC
Diffstat (limited to 'src/gui/buysell.cpp')
-rw-r--r--src/gui/buysell.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp
index 2d39eac7..8bf5f1f4 100644
--- a/src/gui/buysell.cpp
+++ b/src/gui/buysell.cpp
@@ -51,6 +51,13 @@ BuySellDialog::BuySellDialog():
requestFocus();
}
+void BuySellDialog::logic()
+{
+ Window::logic();
+
+ if (!current_npc) setVisible(false);
+}
+
void BuySellDialog::action(const gcn::ActionEvent &event)
{
if (event.getId() == "Buy") {