cabana: fix segfault on screen changed (#28233)

fix segfault on scrrenChanged
pull/28234/head
Dean Lee 2 years ago committed by GitHub
parent a30a0c4b69
commit e6c9e764c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      tools/cabana/chart/chart.cc

@ -44,9 +44,9 @@ ChartView::ChartView(const std::pair<double, double> &x_range, ChartsWidget *par
setTheme(settings.theme == DARK_THEME ? QChart::QChart::ChartThemeDark : QChart::ChartThemeLight);
signal_value_font.setPointSize(9);
QObject::connect(axis_y, &QValueAxis::rangeChanged, [this]() { resetChartCache(); });
QObject::connect(axis_y, &QAbstractAxis::titleTextChanged, [this]() { resetChartCache(); });
QObject::connect(window()->windowHandle(), &QWindow::screenChanged, [this]() { resetChartCache(); });
QObject::connect(axis_y, &QValueAxis::rangeChanged, this, &ChartView::resetChartCache);
QObject::connect(axis_y, &QAbstractAxis::titleTextChanged, this, &ChartView::resetChartCache);
QObject::connect(window()->windowHandle(), &QWindow::screenChanged, this, &ChartView::resetChartCache);
QObject::connect(dbc(), &DBCManager::signalRemoved, this, &ChartView::signalRemoved);
QObject::connect(dbc(), &DBCManager::signalUpdated, this, &ChartView::signalUpdated);

Loading…
Cancel
Save