mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
Fix recording editor initialization
This commit is contained in:
parent
08bc4462cc
commit
efc4c05ed1
1 changed files with 4 additions and 2 deletions
|
|
@ -50,6 +50,8 @@ where
|
||||||
let (id, work, performers) = match recording {
|
let (id, work, performers) = match recording {
|
||||||
Some(recording) => {
|
Some(recording) => {
|
||||||
save_button.set_sensitive(true);
|
save_button.set_sensitive(true);
|
||||||
|
work_label.set_text(&format!("{}: {}", recording.work.composer.name_fl(), recording.work.title));
|
||||||
|
comment_entry.set_text(&recording.comment);
|
||||||
(recording.id, Some(recording.work), recording.performances)
|
(recording.id, Some(recording.work), recording.performances)
|
||||||
}
|
}
|
||||||
None => (rand::random::<u32>().into(), None, Vec::new()),
|
None => (rand::random::<u32>().into(), None, Vec::new()),
|
||||||
|
|
@ -86,8 +88,6 @@ where
|
||||||
result.window.close();
|
result.window.close();
|
||||||
(result.callback)(recording.clone());
|
(result.callback)(recording.clone());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
result.window.close();
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
work_button.connect_clicked(clone!(@strong result => move |_| {
|
work_button.connect_clicked(clone!(@strong result => move |_| {
|
||||||
|
|
@ -124,6 +124,8 @@ where
|
||||||
|
|
||||||
result.window.set_transient_for(Some(parent));
|
result.window.set_transient_for(Some(parent));
|
||||||
|
|
||||||
|
result.show_performers();
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue