diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/inventorywindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemcontainer.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index f63e01d6a..e402eee1a 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -535,6 +535,8 @@ void InventoryWindow::slotsChanged(Inventory* inventory) } mSlotsBar->setText(strprintf("%d/%d", usedSlots, maxSlots)); + if (mItems) + mItems->updateMatrix(); } } diff --git a/src/gui/widgets/itemcontainer.h b/src/gui/widgets/itemcontainer.h index 003187859..171b6e9e7 100644 --- a/src/gui/widgets/itemcontainer.h +++ b/src/gui/widgets/itemcontainer.h @@ -124,6 +124,8 @@ class ItemContainer : public gcn::Widget, void setSortType (int sortType); + void updateMatrix(); + private: enum Direction { @@ -178,7 +180,6 @@ class ItemContainer : public gcn::Widget, */ int getSlotIndex(int x, int y) const; - void updateMatrix(); Inventory *mInventory; int mGridColumns, mGridRows; |