ui->event_view->setModel(events);
connect(ui->event_view->selectionModel(), &QItemSelectionModel::currentRowChanged,
[this, events](const QModelIndex ¤t, const QModelIndex &previous) {
- video->setPosition(events->get_time(current.row()));
+ uint64_t t = events->get_time(current.row());
+ if (t != video->position()) {
+ video->setPosition(events->get_time(current.row()));
+ } else {
+ // Selection could have changed, so we still need to update.
+ // (Just calling setPosition() would not give us the signal
+ // in this case.)
+ update_ui_from_time(t);
+ }
});
ui->player_view->setModel(players);