From 563a7ada60353bd6b5483e6f405a4977514e595c Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 18 May 2023 15:23:32 -0500 Subject: [PATCH] :bug: trying to fix title not changing for ListView --- src/rust/song_model.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rust/song_model.rs b/src/rust/song_model.rs index 91aeb2e..0fbec13 100644 --- a/src/rust/song_model.rs +++ b/src/rust/song_model.rs @@ -62,6 +62,8 @@ mod song_model { bottom_right: &'a QModelIndex, roles: &'a QVector_i32, }, + TitleChanged {}, + FontSizeChanged {}, } enum Role { @@ -243,8 +245,12 @@ mod song_model { Ok(_i) => { if let Some(song) = self.as_mut().songs_mut().get_mut(index as usize) { song.title = updated_title.to_string(); - self.as_mut() - .emit_data_changed(model_index, model_index, &vector_roles); + self.as_mut().emit(Signals::DataChanged { + top_left: &model_index, + bottom_right: &model_index, + roles: &vector_roles, + }); + self.as_mut().emit_title_changed(); true } else { false