Skip to content

Commit

Permalink
no update on resume
Browse files Browse the repository at this point in the history
  • Loading branch information
deanlee committed Dec 21, 2024
1 parent 064dbc3 commit 5a8b9d7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/cabana/videowidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ QWidget *VideoWidget::createCameraWidget() {

QObject::connect(slider, &QSlider::sliderReleased, [this]() { can->seekTo(slider->currentSecond()); });
QObject::connect(can, &AbstractStream::paused, cam_widget, [c = cam_widget]() { c->showPausedOverlay(); });
QObject::connect(can, &AbstractStream::resume, cam_widget, [c = cam_widget]() { c->update(); });
QObject::connect(can, &AbstractStream::eventsMerged, this, [this]() { slider->update(); });
QObject::connect(cam_widget, &CameraWidget::clicked, []() { can->pause(!can->isPaused()); });
QObject::connect(cam_widget, &CameraWidget::vipcAvailableStreamsUpdated, this, &VideoWidget::vipcAvailableStreamsUpdated);
Expand Down Expand Up @@ -227,10 +226,10 @@ void VideoWidget::showThumbnail(double seconds) {
slider->update();
}

bool VideoWidget::eventFilter(QObject *, QEvent *event) {
bool VideoWidget::eventFilter(QObject *obj, QEvent *event) {
if (event->type() == QEvent::MouseMove) {
auto [min_sec, max_sec] = can->timeRange().value_or(std::make_pair(can->minSeconds(), can->maxSeconds()));
showThumbnail(min_sec + (((QMouseEvent *)event)->pos().x() * (max_sec - min_sec) / width()));
showThumbnail(min_sec + static_cast<QMouseEvent *>(event)->pos().x() * (max_sec - min_sec) / slider->width());
} else if (event->type() == QEvent::Leave) {
showThumbnail(-1);
}
Expand Down

0 comments on commit 5a8b9d7

Please sign in to comment.