summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2017-04-30 16:30:24 +0200
committerDennis Nienhüser <[email protected]>2017-05-22 20:49:10 +0200
commit3bf73df7c944cc7d3e1445950acde34acc229d1a (patch)
tree7e44d10287e33e306a3b4c453144d0f6e1a4d95e
parentfd83b5dc58a303b1341723ffb67aab6031baa5af (diff)
Press and hold timer is for left mouse button only
-rw-r--r--src/lib/marble/MarbleInputHandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/marble/MarbleInputHandler.cpp b/src/lib/marble/MarbleInputHandler.cpp
index 218268f..63e874d 100644
--- a/src/lib/marble/MarbleInputHandler.cpp
+++ b/src/lib/marble/MarbleInputHandler.cpp
@@ -453,6 +453,7 @@ void MarbleDefaultInputHandler::handleMouseButtonPress(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton )
{
+ d->m_pressAndHoldTimer.start();
handleLeftMouseButtonPress(event);
}
@@ -544,6 +545,7 @@ void MarbleDefaultInputHandler::handleMouseButtonRelease(QMouseEvent *event)
{
if (event->button() == Qt::LeftButton)
{
+ d->m_pressAndHoldTimer.stop();
//emit current coordinates to be interpreted
//as requested
emit mouseClickScreenPosition(d->m_leftPressedX, d->m_leftPressedY);
@@ -781,13 +783,11 @@ bool MarbleDefaultInputHandler::handleMouseEvent(QMouseEvent *event)
{
if (event->type() == QEvent::MouseButtonPress)
{
- d->m_pressAndHoldTimer.start();
handleMouseButtonPress(event);
}
if (event->type() == QEvent::MouseButtonRelease)
{
- d->m_pressAndHoldTimer.stop();
handleMouseButtonRelease(event);
}