diff options
| author | Méven Car <[email protected]> | 2023-05-29 09:56:50 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-06-13 09:48:55 +0000 |
| commit | cf14a888ceb97e20506164f33f5bd1b5d2212da1 (patch) | |
| tree | ab8195c439a50362d60beef539d7a7907a732384 /src | |
| parent | 3338c2834af81e00c3f2b73ad7061fefce89f226 (diff) | |
Tabbar: duplicate tab when double clicking on it
BUG: 470388
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphintabbar.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index 82695ac21..c04b34954 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); } |
