From 03a2b8e991f938d322cbe019f0ff44224a9b1bd6 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 9 Jan 2012 22:17:05 +0100 Subject: [PATCH] [Fix] Fixing previous commit, it was unable to click on any button. - Oops... --- src/tools/toolbutton.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tools/toolbutton.cpp b/src/tools/toolbutton.cpp index 2cb0ea2ad..25008f308 100644 --- a/src/tools/toolbutton.cpp +++ b/src/tools/toolbutton.cpp @@ -91,19 +91,20 @@ void ToolButton::mousePressEvent(QMouseEvent* e) void ToolButton::mouseReleaseEvent(QMouseEvent* e) { - setDown(false); - if (e->button() == Qt::MiddleButton && rect().contains(e->pos())) { emit middleMouseClicked(); + setDown(false); return; } if (e->button() == Qt::LeftButton && rect().contains(e->pos()) && e->modifiers() == Qt::ControlModifier) { emit controlClicked(); + setDown(false); return; } QToolButton::mouseReleaseEvent(e); + setDown(false); } void ToolButton::paintEvent(QPaintEvent* e)