diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-14 21:30:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-14 21:31:58 +0300 |
commit | 1d290d6a54c2ea6e689446551a8d16025a179177 (patch) | |
tree | 7e0f3c8f5eb392d4450cac2a62caadddd76f350b /src | |
parent | 55d29f52f7ceac17c10b255612750a98e35a4b72 (diff) | |
download | mv-1d290d6a54c2ea6e689446551a8d16025a179177.tar.gz mv-1d290d6a54c2ea6e689446551a8d16025a179177.tar.bz2 mv-1d290d6a54c2ea6e689446551a8d16025a179177.tar.xz mv-1d290d6a54c2ea6e689446551a8d16025a179177.zip |
Fix equipment window selected item draw.
Also fix popup if selection changed.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/equipmentwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/window.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp index eec7bba4c..54eaaf58d 100644 --- a/src/gui/equipmentwindow.cpp +++ b/src/gui/equipmentwindow.cpp @@ -359,8 +359,11 @@ void EquipmentWindow::mouseExited(gcn::MouseEvent &event A_UNUSED) void EquipmentWindow::setSelected(const int index) { mSelected = index; + mRedraw = true; if (mUnequip) mUnequip->setEnabled(mSelected != -1); + if (mItemPopup) + mItemPopup->setVisible(false); } void EquipmentWindow::setBeing(Being *const being) diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 83ae2e42b..9c5be0936 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -54,6 +54,7 @@ Window::Window(const std::string &caption, const bool modal, mDefaultY(0), mDefaultWidth(0), mDefaultHeight(0), + mRedraw(true), mLastRedraw(true), mGrip(nullptr), mParent(parent), @@ -79,7 +80,6 @@ Window::Window(const std::string &caption, const bool modal, mGripPadding(2), mResizeHandles(-1), mOldResizeHandles(-1), - mRedraw(true), mPlayVisibleSound(false), mCaptionFont(getFont()) { diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h index f8ebcd598..95f686729 100644 --- a/src/gui/widgets/window.h +++ b/src/gui/widgets/window.h @@ -433,6 +433,7 @@ class Window : public gcn::Window, int mDefaultY; /**< Default window Y position */ int mDefaultWidth; /**< Default window width */ int mDefaultHeight; /**< Default window height */ + bool mRedraw; bool mLastRedraw; private: @@ -499,7 +500,6 @@ class Window : public gcn::Window, int mGripPadding; int mResizeHandles; int mOldResizeHandles; - bool mRedraw; bool mPlayVisibleSound; gcn::Font *mCaptionFont; }; |