X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/cd2e64154fd5446a7e19aff4cb147efe2f2ba31e..acc5e739ce540768c611940af936602693513f18:/src/dolphintabbar.cpp diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index ac9f1f734..55b5e5edf 100644 --- a/src/dolphintabbar.cpp +++ b/src/dolphintabbar.cpp @@ -103,15 +103,17 @@ void DolphinTabBar::mouseReleaseEvent(QMouseEvent *event) void DolphinTabBar::mouseDoubleClickEvent(QMouseEvent *event) { - int index = tabAt(event->pos()); + if (event->buttons() & Qt::LeftButton) { + int index = tabAt(event->pos()); - if (index < 0) { - // empty tabbar area case - index = currentIndex(); + if (index < 0) { + // empty tabbar area case + index = currentIndex(); + } + // Double left click on the tabbar opens a new activated tab + // with the url from the doubleclicked tab or currentTab otherwise. + Q_EMIT openNewActivatedTab(index); } - // Double click on the tabbar opens a new activated tab - // with the url from the doubleclicked tab or currentTab otherwise. - Q_EMIT openNewActivatedTab(index); QTabBar::mouseDoubleClickEvent(event); } @@ -172,3 +174,5 @@ void DolphinTabBar::updateAutoActivationTimer(const int index) } } } + +#include "moc_dolphintabbar.cpp"