diff options
-rw-r--r-- | src/gui/popupmanager.cpp | 7 | ||||
-rw-r--r-- | src/gui/popupmanager.h | 3 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 8 |
3 files changed, 6 insertions, 12 deletions
diff --git a/src/gui/popupmanager.cpp b/src/gui/popupmanager.cpp index 148689c7b..4c18af585 100644 --- a/src/gui/popupmanager.cpp +++ b/src/gui/popupmanager.cpp @@ -79,13 +79,6 @@ void PopupManager::clearPopup() popupMenu->clear(); } -void PopupManager::showTextPopup(const int x, const int y, - const std::string &text) -{ - if (textPopup) - textPopup->show(x, y, text); -} - bool PopupManager::isTextPopupVisible() const { return textPopup ? textPopup->isPopupVisible() : false; diff --git a/src/gui/popupmanager.h b/src/gui/popupmanager.h index 3c7a0026f..bf0f1c804 100644 --- a/src/gui/popupmanager.h +++ b/src/gui/popupmanager.h @@ -60,9 +60,6 @@ class PopupManager final */ ~PopupManager(); - void showTextPopup(const int x, const int y, - const std::string &text); - bool isBeingPopupVisible() const; bool isTextPopupVisible() const; diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 9bacfeb94..01e20f55d 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -47,6 +47,7 @@ #include "gui/popups/beingpopup.h" #include "gui/popups/popupmenu.h" +#include "gui/popups/textpopup.h" #include "gui/windows/ministatuswindow.h" @@ -791,8 +792,11 @@ void Viewport::mouseMoved(MouseEvent &event A_UNUSED) if (!mHoverSign->getComment().empty()) { popupManager->hideBeingPopup(); - popupManager->showTextPopup(mMouseX, mMouseY, - mHoverSign->getComment()); + if (textPopup) + { + textPopup->show(mMouseX, mMouseY, + mHoverSign->getComment()); + } } else { |