Commit 3bf73df7 authored by Dennis Nienhüser's avatar Dennis Nienhüser

Press and hold timer is for left mouse button only

parent fd83b5dc
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment