summaryrefslogtreecommitdiff
path: root/src/gui/windows/shopwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-15 19:39:27 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-15 19:39:27 +0300
commite6d25b2760a6bdb1b8c7305bdd3d72a607b58ff5 (patch)
treea9f641a60bcd1bc53e431ca1a341ca1ccda8972e /src/gui/windows/shopwindow.cpp
parent3e622efc563e7359000c48eef265d6616026e52a (diff)
downloadmanaverse-e6d25b2760a6bdb1b8c7305bdd3d72a607b58ff5.tar.gz
manaverse-e6d25b2760a6bdb1b8c7305bdd3d72a607b58ff5.tar.bz2
manaverse-e6d25b2760a6bdb1b8c7305bdd3d72a607b58ff5.tar.xz
manaverse-e6d25b2760a6bdb1b8c7305bdd3d72a607b58ff5.zip
fix enable/disable add/remove buttons in shop window in buy dialog.
Diffstat (limited to 'src/gui/windows/shopwindow.cpp')
-rw-r--r--src/gui/windows/shopwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/windows/shopwindow.cpp b/src/gui/windows/shopwindow.cpp
index 67c076912..8f858b0fe 100644
--- a/src/gui/windows/shopwindow.cpp
+++ b/src/gui/windows/shopwindow.cpp
@@ -417,8 +417,9 @@ void ShopWindow::updateButtonsAndLabels()
const bool sellNotEmpty = mSellShopItems->getNumberOfElements() > 0;
if (isBuySelected)
{
- allowAdd = !mEnableVending;
- allowDel = mBuyShopItemList->getSelected() != -1
+ allowAdd = !mEnableBuyingStore;
+ allowDel = !mEnableBuyingStore
+ && mBuyShopItemList->getSelected() != -1
&& mBuyShopItems->getNumberOfElements() > 0;
if (mPublishButton)
{