summaryrefslogtreecommitdiff
path: root/src/gui/buysell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/buysell.cpp')
-rw-r--r--src/gui/buysell.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/buysell.cpp b/src/gui/buysell.cpp
index c6b4ef41..4419ffcc 100644
--- a/src/gui/buysell.cpp
+++ b/src/gui/buysell.cpp
@@ -21,7 +21,7 @@
#include "buysell.h"
-#include "npc.h"
+#include "playerinfo.h"
#include "gui/setup.h"
@@ -67,11 +67,16 @@ BuySellDialog::BuySellDialog(int npcId):
instances.push_back(this);
setVisible(true);
+
+ PlayerInfo::setBuySellState(BUYSELL_CHOOSING);
}
BuySellDialog::~BuySellDialog()
{
instances.remove(this);
+
+ if (PlayerInfo::getBuySellState() == BUYSELL_CHOOSING)
+ PlayerInfo::setBuySellState(BUYSELL_NONE);
}
void BuySellDialog::setVisible(bool visible)