diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-19 20:12:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-19 20:12:20 +0300 |
commit | ce6238dcc772ec901291c5f1dc5e57b89a0a2fc4 (patch) | |
tree | 87f1544fb41ea2e08212a87534675126c770bd25 /src/gui/selldialog.cpp | |
parent | 2ff996eb1b6e7e8f277efe369d616d57558c6667 (diff) | |
download | plus-ce6238dcc772ec901291c5f1dc5e57b89a0a2fc4.tar.gz plus-ce6238dcc772ec901291c5f1dc5e57b89a0a2fc4.tar.bz2 plus-ce6238dcc772ec901291c5f1dc5e57b89a0a2fc4.tar.xz plus-ce6238dcc772ec901291c5f1dc5e57b89a0a2fc4.zip |
improve selldialog class.
Diffstat (limited to 'src/gui/selldialog.cpp')
-rw-r--r-- | src/gui/selldialog.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp index 82d79104a..8006355bc 100644 --- a/src/gui/selldialog.cpp +++ b/src/gui/selldialog.cpp @@ -151,7 +151,6 @@ SellDialog::~SellDialog() { delete mShopItems; mShopItems = nullptr; - instances.remove(this); } @@ -159,10 +158,7 @@ void SellDialog::reset() { mShopItems->clear(); mSlider->setValue(0); - - // Reset previous selected item to prevent failing asserts mShopItemList->setSelected(-1); - updateButtonsAndLabels(); } @@ -234,12 +230,13 @@ void SellDialog::action(const gcn::ActionEvent &event) { if (eventId == "presell") { - ShopItem *const item = mShopItems->at(selectedItem); + const ShopItem *const item = mShopItems->at(selectedItem); const ItemInfo &info = ItemDB::get(item->getId()); if (info.isProtected()) { - // TRANSLATORS: sell confirmation header - ConfirmDialog *dialog = new ConfirmDialog(_("sell item"), + ConfirmDialog *const dialog = new ConfirmDialog( + // TRANSLATORS: sell confirmation header + _("sell item"), // TRANSLATORS: sell confirmation message strprintf(_("Do you really want to sell %s?"), info.getName().c_str()), false, true); @@ -292,7 +289,6 @@ void SellDialog::action(const gcn::ActionEvent &event) else { ShopItem *const item = mShopItems->at(selectedItem); - Net::getBuySellHandler()->sendSellRequest(mNick, item, mAmountItems); |