mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 14:43:57 +08:00
cabana: fix updating tabbar_ids on "Close Other Tabs" (#27362)
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