From 57f5e6102deaf8903cff99ab30546e536c4d264d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 16 Feb 2017 14:46:58 +0100 Subject: Fix double click on buttons. --- plugingui/eventhandler.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugingui/eventhandler.cc') diff --git a/plugingui/eventhandler.cc b/plugingui/eventhandler.cc index 2cdb6b1..2177433 100644 --- a/plugingui/eventhandler.cc +++ b/plugingui/eventhandler.cc @@ -146,14 +146,14 @@ void EventHandler::processEvents() case EventType::button: { - if(lastWasDoubleClick) + auto buttonEvent = static_cast(event.get()); + + if(lastWasDoubleClick && (buttonEvent->direction == Direction::down)) { lastWasDoubleClick = false; continue; } - auto buttonEvent = static_cast(event.get()); - lastWasDoubleClick = buttonEvent->doubleClick; auto widget = window.find(buttonEvent->x, buttonEvent->y); -- cgit v1.2.3