changeset 23301:81bc57aa7024

allow double left click for closing tabs in the doc browser (bug #44605) * webinfo.cc (webinfo_tab_bar::mousePressEvent): also check for a left doubleclick when closing the tab by a mouse press event
author Torsten <mttl@mailbox.org>
date Sat, 18 Mar 2017 14:11:27 +0100
parents 5bddd4089386
children 78cf75ffd382
files libgui/src/qtinfo/webinfo.cc
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/qtinfo/webinfo.cc	Sat Mar 18 09:43:56 2017 +0100
+++ b/libgui/src/qtinfo/webinfo.cc	Sat Mar 18 14:11:27 2017 +0100
@@ -322,9 +322,11 @@
 void
 webinfo_tab_bar::mousePressEvent (QMouseEvent *me)
 {
-  if (me->type () != QEvent::MouseButtonDblClick &&
-      me->button() == Qt::MidButton &&
-      count () > 1)
+  if (count () > 1 &&
+      ((me->type () == QEvent::MouseButtonDblClick &&
+        me->button() == Qt::LeftButton) ||
+       (me->type () != QEvent::MouseButtonDblClick &&
+        me->button() == Qt::MidButton)))
     {
       // Middle click into the tabbar -> close the tab
       for (int i = 0; i < count (); i++)