┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphintabbar.cpp
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2023-06-28 09:49:46 +0200
committerMéven Car <[email protected]>2023-06-28 09:49:46 +0200
commitcd2e64154fd5446a7e19aff4cb147efe2f2ba31e (patch)
tree37f4e2c8644129f809a66fd2f6b2c9b28d52fed8 /src/dolphintabbar.cpp
parentdcd5c994bb1d331b94fdea8a5c6cd55a471b34b8 (diff)
parentea56e1f75eae435c18e3934c402c94ae76ec9c11 (diff)
Merge branch 'master' into kf6
Diffstat (limited to 'src/dolphintabbar.cpp')
-rw-r--r--src/dolphintabbar.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp
index aa74e17ae..ac9f1f734 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);
}