X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/76e3eab6ea3545339da2fd30b838acbc8c0ff607..9ed236d88ded945c683cf76be92e6032172975d0:/src/dolphintabbar.cpp diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index aa74e17ae..c70089223 100644 --- a/src/dolphintabbar.cpp +++ b/src/dolphintabbar.cpp @@ -103,14 +103,15 @@ void DolphinTabBar::mouseReleaseEvent(QMouseEvent *event) void DolphinTabBar::mouseDoubleClickEvent(QMouseEvent *event) { - const int index = tabAt(event->pos()); + int index = tabAt(event->pos()); if (index < 0) { - // Double click on the empty tabbar area opens a new activated tab - // with the url from the current tab. - Q_EMIT openNewActivatedTab(currentIndex()); - return; + // empty tabbar area case + index = currentIndex(); } + // 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); } @@ -171,3 +172,5 @@ void DolphinTabBar::updateAutoActivationTimer(const int index) } } } + +#include "moc_dolphintabbar.cpp"