From 9ee7bf166d4af7184cf6eb7757630f100d88b2e4 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Sun, 8 Nov 2020 18:00:46 +0100 Subject: [PATCH] Initialize comment entry in recording editor --- src/dialogs/recording/recording_editor.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dialogs/recording/recording_editor.rs b/src/dialogs/recording/recording_editor.rs index af678b5..502fb89 100644 --- a/src/dialogs/recording/recording_editor.rs +++ b/src/dialogs/recording/recording_editor.rs @@ -12,7 +12,6 @@ use std::rc::Rc; /// A widget for creating or editing a recording. // TODO: Disable buttons if no performance is selected. -// TODO: Initialize comment entry. pub struct RecordingEditor { pub widget: gtk::Box, backend: Rc, @@ -56,7 +55,10 @@ impl RecordingEditor { scroll.add(&performance_list.widget); let (id, work, performances) = match recording { - Some(recording) => (recording.id, Some(recording.work), recording.performances), + Some(recording) => { + comment_entry.set_text(&recording.comment); + (recording.id, Some(recording.work), recording.performances) + } None => (rand::random::().into(), None, Vec::new()), };