mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-05 05:22:07 +08:00
cabana: fix updating tabbar_ids on "Close Other Tabs" (#27362)
old-commit-hash: e6c02027d3d7c6cd850fb13b948bd010b15b5308
This commit is contained in:
@@ -103,10 +103,14 @@ void DetailWidget::showTabBarContextMenu(const QPoint &pt) {
|
||||
QMenu menu(this);
|
||||
menu.addAction(tr("Close Other Tabs"));
|
||||
if (menu.exec(tabbar->mapToGlobal(pt))) {
|
||||
tabbar_ids.move(index, 0);
|
||||
tabbar->moveTab(index, 0);
|
||||
tabbar->setCurrentIndex(0);
|
||||
while (tabbar->count() > 1)
|
||||
while (tabbar->count() > 1) {
|
||||
tabbar_ids.removeAt(1);
|
||||
tabbar->removeTab(1);
|
||||
}
|
||||
assert(tabbar_ids.size() == tabbar->count());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user