mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-10-01 03:43:51 +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);
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user