summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-03-08 13:51:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-03-08 17:55:40 +0300
commit9247c5a23757e01ef7ee91dd5655fcab177e5e6d (patch)
tree38e947cdaa6f1ec33651560b81851b7a255a58ac /src/gui/windows/inventorywindow.cpp
parentfcf53dd7d524c2204f39269be5768a1919daef42 (diff)
downloadplus-9247c5a23757e01ef7ee91dd5655fcab177e5e6d.tar.gz
plus-9247c5a23757e01ef7ee91dd5655fcab177e5e6d.tar.bz2
plus-9247c5a23757e01ef7ee91dd5655fcab177e5e6d.tar.xz
plus-9247c5a23757e01ef7ee91dd5655fcab177e5e6d.zip
fix code style.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index a12dca882..92b21dfd1 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -59,8 +59,6 @@
#include "net/inventoryhandler.h"
#include "net/net.h"
-#include "utils/gettext.h"
-
#include <string>
#include "debug.h"
@@ -281,7 +279,7 @@ InventoryWindow::~InventoryWindow()
mTextPopup = nullptr;
}
-void InventoryWindow::storeSortOrder()
+void InventoryWindow::storeSortOrder() const
{
if (mInventory)
{
@@ -669,7 +667,8 @@ void InventoryWindow::updateButtons(const Item *item)
void InventoryWindow::setSplitAllowed(const bool allowed)
{
- mSplitButton->setVisible(allowed);
+ if (mSplitButton)
+ mSplitButton->setVisible(allowed);
}
void InventoryWindow::close()
@@ -699,7 +698,7 @@ void InventoryWindow::processEvent(const Channels channel A_UNUSED,
void InventoryWindow::updateWeight()
{
- if (!isMainInventory())
+ if (!isMainInventory() || !mWeightBar)
return;
const int total = PlayerInfo::getAttribute(PlayerInfo::TOTAL_WEIGHT);