summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp1
-rw-r--r--src/gui/windows/inventorywindow.cpp4
-rw-r--r--src/gui/windows/inventorywindow.h2
-rw-r--r--src/net/ea/inventoryhandler.cpp3
4 files changed, 10 insertions, 0 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3e2b1859d..50cb1377e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -219,6 +219,7 @@ static void createGuiWindows()
statusWindow = new StatusWindow;
miniStatusWindow = new MiniStatusWindow;
inventoryWindow = new InventoryWindow(PlayerInfo::getInventory());
+ inventoryWindow->postInit();
shopWindow = new ShopWindow;
skillDialog = new SkillDialog;
minimap = new Minimap;
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index dde1bf709..6fffb3cf2 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -282,6 +282,10 @@ InventoryWindow::InventoryWindow(Inventory *const inventory):
loadWindowState();
enableVisibleSound(true);
+}
+
+void InventoryWindow::postInit()
+{
slotsChanged(mInventory);
mItems->setSortType(mSortDropDown->getSelected());
diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h
index 459e3bfa2..d8742dd64 100644
--- a/src/gui/windows/inventorywindow.h
+++ b/src/gui/windows/inventorywindow.h
@@ -69,6 +69,8 @@ class InventoryWindow final : public Window,
*/
~InventoryWindow();
+ void postInit() override;
+
void storeSortOrder();
/**
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index f8bb619e9..be761fa19 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -428,7 +428,10 @@ void InventoryHandler::processPlayerStorageStatus(Net::MessageIn &msg)
mInventoryItems.clear();
if (!mStorageWindow)
+ {
mStorageWindow = new InventoryWindow(mStorage);
+ mStorageWindow->postInit();
+ }
}
void InventoryHandler::processPlayerStorageAdd(Net::MessageIn &msg)