diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-05 19:09:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-05 19:09:02 +0300 |
commit | 92c019dad798f1a84c5d3e8e8331a885f6458133 (patch) | |
tree | 078d58c3b78ed37d23e7292460f4443f5ef799dd /src/gui/widgets/popuplist.cpp | |
parent | e6d251345a48108495d39d82b0ec79deac63d86d (diff) | |
download | manaverse-92c019dad798f1a84c5d3e8e8331a885f6458133.tar.gz manaverse-92c019dad798f1a84c5d3e8e8331a885f6458133.tar.bz2 manaverse-92c019dad798f1a84c5d3e8e8331a885f6458133.tar.xz manaverse-92c019dad798f1a84c5d3e8e8331a885f6458133.zip |
Add to left classes stong typed Modal enum.
Diffstat (limited to 'src/gui/widgets/popuplist.cpp')
-rw-r--r-- | src/gui/widgets/popuplist.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/popuplist.cpp b/src/gui/widgets/popuplist.cpp index e695c734b..c459fe351 100644 --- a/src/gui/widgets/popuplist.cpp +++ b/src/gui/widgets/popuplist.cpp @@ -30,7 +30,8 @@ PopupList::PopupList(DropDown *const widget, ListModel *const listModel, - bool extended, bool modal) : + const bool extended, + const Modal modal) : Popup("PopupList", "popuplist.xml"), FocusListener(), mListModel(listModel), @@ -88,7 +89,7 @@ void PopupList::show(int x, int y) setPosition(x, y); setVisible(true); requestMoveToTop(); - if (mModal) + if (mModal == Modal_true) requestModalFocus(); } @@ -153,7 +154,7 @@ void PopupList::mouseReleased(MouseEvent& event) if (mDropDown) mDropDown->updateSelection(); setVisible(false); - if (mModal) + if (mModal == Modal_true) releaseModalFocus(); } @@ -169,7 +170,7 @@ void PopupList::focusGained(const Event& event) if (mDropDown) mDropDown->updateSelection(); setVisible(false); - if (mModal) + if (mModal == Modal_true) releaseModalFocus(); } |