summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-10 19:27:16 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-10 19:27:16 +0300
commit051d2ee3bc0ec387acde86081d999b1c90a7806f (patch)
tree9932582eda03c3f22fa2f565f71c2401eae84dd9 /src
parent54ff787c3015e79989cd239947b0e033673c38ee (diff)
downloadplus-051d2ee3bc0ec387acde86081d999b1c90a7806f.tar.gz
plus-051d2ee3bc0ec387acde86081d999b1c90a7806f.tar.bz2
plus-051d2ee3bc0ec387acde86081d999b1c90a7806f.tar.xz
plus-051d2ee3bc0ec387acde86081d999b1c90a7806f.zip
Hide item popup if open popupmenu.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popupmanager.cpp11
-rw-r--r--src/gui/popupmanager.h2
-rw-r--r--src/gui/popups/popupmenu.cpp2
3 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/popupmanager.cpp b/src/gui/popupmanager.cpp
index c415956ce..3aed639e9 100644
--- a/src/gui/popupmanager.cpp
+++ b/src/gui/popupmanager.cpp
@@ -24,8 +24,11 @@
#include "sdlshared.h"
+#ifndef DYECMD
#include "gui/popups/beingpopup.h"
+#include "gui/popups/itempopup.h"
#include "gui/popups/popupmenu.h"
+#endif // DYECMD
#include "gui/popups/textpopup.h"
#include "debug.h"
@@ -70,6 +73,14 @@ void PopupManager::hidePopupMenu()
#endif // DYECMD
}
+void PopupManager::hideItemPopup()
+{
+#ifndef DYECMD
+ if (itemPopup)
+ itemPopup->hide();
+#endif // DYECMD
+}
+
bool PopupManager::isPopupMenuVisible()
{
#ifndef DYECMD
diff --git a/src/gui/popupmanager.h b/src/gui/popupmanager.h
index a3b42f2bf..a3dd08a54 100644
--- a/src/gui/popupmanager.h
+++ b/src/gui/popupmanager.h
@@ -57,6 +57,8 @@ class PopupManager final
static void hideTextPopup();
+ static void hideItemPopup();
+
static bool isPopupMenuVisible() A_WARN_UNUSED;
static void clearPopup();
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 86bd4e4d5..8b97b7185 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -41,6 +41,7 @@
#include "gui/buttontext.h"
#include "gui/gui.h"
+#include "gui/popupmanager.h"
#include "gui/viewport.h"
#include "gui/windowmenu.h"
@@ -2417,6 +2418,7 @@ void PopupMenu::showSkillTypePopup(const SkillInfo *const info)
void PopupMenu::showPopup(int x, int y)
{
+ popupManager->hideItemPopup();
const int pad2 = 2 * mPadding;
mBrowserBox->setPosition(mPadding, mPadding);
mScrollArea->setPosition(mPadding, mPadding);