summaryrefslogtreecommitdiff
path: root/src/gui/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/inventorywindow.cpp')
-rw-r--r--src/gui/inventorywindow.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index bb6f021e..f214fde5 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -331,11 +331,14 @@ void InventoryWindow::setSplitAllowed(bool allowed)
void InventoryWindow::close()
{
if (this == inventoryWindow)
- return;
-
- Net::getInventoryHandler()->closeStorage(Inventory::STORAGE);
-
- scheduleDelete();
+ {
+ setVisible(false);
+ }
+ else
+ {
+ Net::getInventoryHandler()->closeStorage(Inventory::STORAGE);
+ scheduleDelete();
+ }
}
void InventoryWindow::updateWeight()