QItemSelectionModel *select = ui->event_view->selectionModel();
if (select->hasSelection()) {
int row = select->selectedRows().front().row(); // Should only be one, due to our selection behavior.
- string expected_type = offense ? "formation_offense" : "formation_defense";
+ EventType expected_type = offense ? EventType::FORMATION_OFFENSE : EventType::FORMATION_DEFENSE;
if (events->get_event_type(row) == expected_type) {
events->set_event_formation(row, formation_id);
update_ui_from_time(ui->video->get_position());