summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-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);