From 5de322cf706004227fd0ebec59e0ebb50631df3a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 24 Jan 2015 16:40:21 +0300 Subject: Fix check for opened storage window. --- src/gui/windows/inventorywindow.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/gui') diff --git a/src/gui/windows/inventorywindow.h b/src/gui/windows/inventorywindow.h index 228f140bf..119de9e94 100644 --- a/src/gui/windows/inventorywindow.h +++ b/src/gui/windows/inventorywindow.h @@ -35,6 +35,7 @@ class Button; class DropDown; +class InventoryWindow; class Item; class ItemContainer; class LayoutCell; @@ -43,6 +44,12 @@ class SortListModelInv; class TabStrip; class TextField; +extern InventoryWindow *inventoryWindow; +extern InventoryWindow *storageWindow; +#ifdef EATHENA_SUPPORT +extern InventoryWindow *cartWindow; +#endif // EATHENA_SUPPORT + /** * Inventory dialog. * @@ -132,7 +139,7 @@ class InventoryWindow final : public Window, * Returns true if any instances exist. */ static bool isStorageActive() A_WARN_UNUSED - { return invInstances.size() > 1; } + { return storageWindow; } void updateDropButton(); @@ -200,10 +207,4 @@ class InventoryWindow final : public Window, bool mCompactMode; }; -extern InventoryWindow *inventoryWindow; -extern InventoryWindow *storageWindow; -#ifdef EATHENA_SUPPORT -extern InventoryWindow *cartWindow; -#endif // EATHENA_SUPPORT - #endif // GUI_WINDOWS_INVENTORYWINDOW_H -- cgit v1.2.3-70-g09d2