summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-17 14:10:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-17 14:10:45 +0300
commitce6110221f43e5b8cd24ba954de17d00ac84fc9d (patch)
treef486d1749c879dc9a99add1df9617c8f3f0cb453
parentdbf6fd812e5eff87a8fc38c4f5635845493885b1 (diff)
downloadplus-ce6110221f43e5b8cd24ba954de17d00ac84fc9d.tar.gz
plus-ce6110221f43e5b8cd24ba954de17d00ac84fc9d.tar.bz2
plus-ce6110221f43e5b8cd24ba954de17d00ac84fc9d.tar.xz
plus-ce6110221f43e5b8cd24ba954de17d00ac84fc9d.zip
Remove proxy methods used for access text popup.
-rw-r--r--src/gui/popupmanager.cpp7
-rw-r--r--src/gui/popupmanager.h3
-rw-r--r--src/gui/viewport.cpp8
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
{