mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
dolphintabbar: only open tab on double left click
A new tab should be opened only if the double click comes from the left button. BUG: 480098 FIXED-IN: 24.02
This commit is contained in:
parent
3202f8e310
commit
acc5e739ce
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user