Hitting the emergency exit (#861)
Don't change the widget state when the ID exceeds the current widget list due to pages being changed while evidence is being edited.
This commit is contained in:
parent
7746b9593c
commit
15af6c34ec
@ -487,7 +487,11 @@ void Courtroom::on_evidence_double_clicked(int p_id)
|
||||
for (AOEvidenceButton *i_button : qAsConst(ui_evidence_list))
|
||||
i_button->set_selected(false);
|
||||
|
||||
ui_evidence_list.at(p_id)->set_selected(true);
|
||||
// We have to check if the ID is on the currently displayed page.
|
||||
// This is because SOMEONE allowed the switching of pages while evidence is still being edited.
|
||||
if (p_id < ui_evidence_list.count()) {
|
||||
ui_evidence_list.at(p_id)->set_selected(true);
|
||||
}
|
||||
current_evidence = f_real_id;
|
||||
|
||||
evi_type f_evi = local_evidence_list.at(f_real_id);
|
||||
|
Loading…
Reference in New Issue
Block a user