summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 20:02:02 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 20:02:02 +0300
commit4fc40c384a3423e43f2e589809c9bc9aa8bda495 (patch)
treebe68429d688d6ef7bcba72c865ebcd080db871c6 /src/gui/widgets/textfield.cpp
parent249d59d10905f46ee91683d08386c7bc9936bc4b (diff)
downloadplus-4fc40c384a3423e43f2e589809c9bc9aa8bda495.tar.gz
plus-4fc40c384a3423e43f2e589809c9bc9aa8bda495.tar.bz2
plus-4fc40c384a3423e43f2e589809c9bc9aa8bda495.tar.xz
plus-4fc40c384a3423e43f2e589809c9bc9aa8bda495.zip
For some popup menus use current mouse position.
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index a20b05e1e..48d3a86fc 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -706,21 +706,7 @@ void TextField::mousePressed(MouseEvent &event)
if (event.getButton() == MouseButton::RIGHT)
{
if (popupMenu)
- {
- if (viewport)
- {
- popupMenu->showTextFieldPopup(viewport->mMouseX,
- viewport->mMouseY,
- this);
- }
- else
- {
- int mouseX = 0;
- int mouseY = 0;
- Gui::getMouseState(&mouseX, &mouseY);
- popupMenu->showTextFieldPopup(mouseX, mouseY, this);
- }
- }
+ popupMenu->showTextFieldPopup(this);
}
else if (event.getButton() == MouseButton::LEFT)
{