|
|
@ -103,10 +103,14 @@ void DetailWidget::showTabBarContextMenu(const QPoint &pt) { |
|
|
|
QMenu menu(this); |
|
|
|
QMenu menu(this); |
|
|
|
menu.addAction(tr("Close Other Tabs")); |
|
|
|
menu.addAction(tr("Close Other Tabs")); |
|
|
|
if (menu.exec(tabbar->mapToGlobal(pt))) { |
|
|
|
if (menu.exec(tabbar->mapToGlobal(pt))) { |
|
|
|
|
|
|
|
tabbar_ids.move(index, 0); |
|
|
|
tabbar->moveTab(index, 0); |
|
|
|
tabbar->moveTab(index, 0); |
|
|
|
tabbar->setCurrentIndex(0); |
|
|
|
tabbar->setCurrentIndex(0); |
|
|
|
while (tabbar->count() > 1) |
|
|
|
while (tabbar->count() > 1) { |
|
|
|
|
|
|
|
tabbar_ids.removeAt(1); |
|
|
|
tabbar->removeTab(1); |
|
|
|
tabbar->removeTab(1); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
assert(tabbar_ids.size() == tabbar->count()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|