Fix borrow issue in track set editor

This commit is contained in:
Elias Projahn 2021-02-07 15:28:16 +01:00
parent 4a8429c6e3
commit eed133e73d

View file

@ -154,8 +154,8 @@ impl Screen<Rc<Box<dyn Source>>, TrackSetData> for TrackSetEditor {
let recording = this.recording.borrow().clone();
if let Some(recording) = recording {
spawn!(@clone this, async move {
let track = &this.tracks.borrow()[index];
if let Some(selection) = push!(this.handle, TrackEditor, (recording, track.work_parts.clone())).await {
let work_parts = this.tracks.borrow()[index].work_parts.clone();
if let Some(selection) = push!(this.handle, TrackEditor, (recording, work_parts)).await {
{
let mut tracks = this.tracks.borrow_mut();
let mut track = &mut tracks[index];