Insert part after selected index in recording editor

This commit is contained in:
Elias Projahn 2020-11-08 17:36:21 +01:00
parent 99bbd9e58f
commit a763b8a9c3

View file

@ -12,6 +12,7 @@ use std::rc::Rc;
/// A widget for creating or editing a recording. /// A widget for creating or editing a recording.
// TODO: Disable buttons if no performance is selected. // TODO: Disable buttons if no performance is selected.
// TODO: Initialize comment entry.
pub struct RecordingEditor { pub struct RecordingEditor {
pub widget: gtk::Box, pub widget: gtk::Box,
backend: Rc<Backend>, backend: Rc<Backend>,
@ -130,7 +131,7 @@ impl RecordingEditor {
None => performances.len(), None => performances.len(),
}; };
performances.push(performance); performances.insert(index, performance);
this.performance_list.show_items(performances.clone()); this.performance_list.show_items(performances.clone());
this.performance_list.select_index(index); this.performance_list.select_index(index);
})); }));