diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-12 08:52:03 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2005-08-12 08:52:03 +0000 |
commit | ebd331e0db4b7488efe572e93e1de5ae7fa15eca (patch) | |
tree | 13d2f1a3d93de9958ae2a5e3bad42a7603d1305e /src/gui/buy.cpp | |
parent | be53fc074afd6bfc2a9e2b16dadbde372fb7cd09 (diff) | |
download | mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.gz mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.bz2 mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.tar.xz mana-ebd331e0db4b7488efe572e93e1de5ae7fa15eca.zip |
Resetting quantity to 0 after selecting other items in buy/sell dialogs.
Diffstat (limited to 'src/gui/buy.cpp')
-rw-r--r-- | src/gui/buy.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/buy.cpp b/src/gui/buy.cpp index 86ea764b..ecb1343e 100644 --- a/src/gui/buy.cpp +++ b/src/gui/buy.cpp @@ -164,6 +164,14 @@ void BuyDialog::action(const std::string& eventId) slider->setEnabled(true); increaseButton->setEnabled(true); m_amountItems = 0; + slider->setValue(0); + oss << m_amountItems; + quantityLabel->setCaption(oss.str()); + quantityLabel->adjustSize(); + oss.str("price : 0 GP"); + moneyLabel->setCaption(oss.str()); + moneyLabel->adjustSize(); + decreaseButton->setEnabled(false); m_maxItems = m_money / shopInventory[selectedItem].price; } else |