cabana: fix crash when switching dbc file (#30227)

fix crash when switching dbc file
old-commit-hash: 47813ae8b5
testing-closet
Dean Lee 2 years ago committed by GitHub
parent 19496e86c7
commit 4ec199f1c1
  1. 3
      tools/cabana/chart/chartswidget.cc

@ -405,16 +405,15 @@ void ChartsWidget::removeAll() {
tabbar->removeTab(1); tabbar->removeTab(1);
} }
tab_charts.clear(); tab_charts.clear();
zoomReset();
if (!charts.isEmpty()) { if (!charts.isEmpty()) {
for (auto c : charts) { for (auto c : charts) {
delete c; delete c;
} }
charts.clear(); charts.clear();
updateToolBar();
emit seriesChanged(); emit seriesChanged();
} }
zoomReset();
} }
void ChartsWidget::alignCharts() { void ChartsWidget::alignCharts() {

Loading…
Cancel
Save