🐛 trying to fix title not changing for ListView

This commit is contained in:
Chris Cochrun 2023-05-18 15:23:32 -05:00
parent 6cff851895
commit 563a7ada60

View file

@ -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