mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-03 04:22:09 +08:00
cabana: fix chart range not updated when replay is seeking back. (#27036)
old-commit-hash: a0f91b0a8b1f9e8d14adfb32691c8dec66807d13
This commit is contained in:
@@ -135,7 +135,7 @@ void ChartsWidget::updateState() {
|
||||
const double cur_sec = can->currentSec();
|
||||
if (!is_zoomed) {
|
||||
double pos = (cur_sec - display_range.first) / max_chart_range;
|
||||
if (pos > 0.8) {
|
||||
if (pos < 0 || pos > 0.8) {
|
||||
const double min_event_sec = (can->events()->front()->mono_time / (double)1e9) - can->routeStartTime();
|
||||
display_range.first = std::floor(std::max(min_event_sec, cur_sec - max_chart_range * 0.2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user