From 9df0183f9a45d92a6be9e3ef9c7641b903134ba3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 3 Jun 2013 13:31:46 +0300 Subject: hide dropdown box in inventory if inventory closed. --- src/gui/inventorywindow.cpp | 7 +++++++ src/gui/inventorywindow.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'src/gui') diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp index ca6804ea9..f659b8693 100644 --- a/src/gui/inventorywindow.cpp +++ b/src/gui/inventorywindow.cpp @@ -804,3 +804,10 @@ void InventoryWindow::widgetResized(const gcn::Event &event) mCompactMode = false; } } + +void InventoryWindow::setVisible(bool visible) +{ + if (!visible) + mSortDropDown->hideDrop(); + Window::setVisible(visible); +} diff --git a/src/gui/inventorywindow.h b/src/gui/inventorywindow.h index 16df44890..42227d022 100644 --- a/src/gui/inventorywindow.h +++ b/src/gui/inventorywindow.h @@ -149,6 +149,8 @@ class InventoryWindow final : public Window, void mouseExited(gcn::MouseEvent &event) override; + void setVisible(bool visible) override; + static bool isAnyInputFocused(); private: -- cgit v1.2.3-70-g09d2