summaryrefslogtreecommitdiff
path: root/src/gui/sell.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-08-22 21:57:34 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-08-22 21:57:34 +0000
commit097ef85eed1e7ea957f3204f4601a2ae63ba20f7 (patch)
tree09df7e7f087968aed4b2b7dc94d8a03ff3114e18 /src/gui/sell.cpp
parent59618657040cac0ccf2be7c39bbdfc0c15f6b40c (diff)
downloadmana-097ef85eed1e7ea957f3204f4601a2ae63ba20f7.tar.gz
mana-097ef85eed1e7ea957f3204f4601a2ae63ba20f7.tar.bz2
mana-097ef85eed1e7ea957f3204f4601a2ae63ba20f7.tar.xz
mana-097ef85eed1e7ea957f3204f4601a2ae63ba20f7.zip
Converted the buy & sell diaogs asserts into ifs to avoid game crashing, and made additional checks on buy sell events to have buttons enabled only when they're useful.
Diffstat (limited to 'src/gui/sell.cpp')
-rw-r--r--src/gui/sell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/sell.cpp b/src/gui/sell.cpp
index 6bac0bb1..2a2a591e 100644
--- a/src/gui/sell.cpp
+++ b/src/gui/sell.cpp
@@ -125,6 +125,11 @@ void SellDialog::reset()
m_amountItems = 0;
quantityLabel->setCaption("0");
quantityLabel->adjustSize();
+
+ // Reset Previous Selected Items to prevent failing asserts
+ itemList->setSelected(-1);
+ increaseButton->setEnabled(false);
+ decreaseButton->setEnabled(false);
}
void SellDialog::addItem(short index, int price)