From 097ef85eed1e7ea957f3204f4601a2ae63ba20f7 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Mon, 22 Aug 2005 21:57:34 +0000 Subject: 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. --- src/gui/sell.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/sell.cpp') 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) -- cgit v1.2.3-70-g09d2