Skip to content

Commit

Permalink
cabana: fix parts of chart widget not being redrawn (commaai#27742)
Browse files Browse the repository at this point in the history
* cabana: fix parts of chart widget not being redrawn

* revert others
  • Loading branch information
pd0wm authored and pull[bot] committed Nov 17, 2023
1 parent d35c4a5 commit 4507e3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/cabana/chartswidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ void ChartView::updatePlot(double cur, double min, double max) {
updateAxisY();
updateSeriesPoints();
}
update();
scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
}

void ChartView::updateSeriesPoints() {
Expand Down Expand Up @@ -716,7 +716,7 @@ void ChartView::mouseReleaseEvent(QMouseEvent *event) {
} else if (rubber->width() > 10) {
emit zoomIn(min_rounded, max_rounded);
} else {
update();
scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
}
event->accept();
} else if (!can->liveStreaming() && event->button() == Qt::RightButton) {
Expand Down Expand Up @@ -774,7 +774,7 @@ void ChartView::mouseMoveEvent(QMouseEvent *ev) {
text_list.push_front(QString::number(chart()->mapToValue({x, 0}).x(), 'f', 3));
QPointF tooltip_pt(x + 12, plot_area.top() - 20);
QToolTip::showText(mapToGlobal(tooltip_pt.toPoint()), text_list.join("<br />"), this, plot_area.toRect());
update();
scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
} else {
QToolTip::hideText();
}
Expand All @@ -787,7 +787,7 @@ void ChartView::mouseMoveEvent(QMouseEvent *ev) {
if (rubber_rect != rubber->geometry()) {
rubber->setGeometry(rubber_rect);
}
update();
scene()->invalidate({}, QGraphicsScene::ForegroundLayer);
}
}

Expand Down

0 comments on commit 4507e3e

Please sign in to comment.