🐛 trying to fix title not changing for ListView
This commit is contained in:
parent
6cff851895
commit
563a7ada60
1 changed files with 8 additions and 2 deletions
|
@ -62,6 +62,8 @@ mod song_model {
|
||||||
bottom_right: &'a QModelIndex,
|
bottom_right: &'a QModelIndex,
|
||||||
roles: &'a QVector_i32,
|
roles: &'a QVector_i32,
|
||||||
},
|
},
|
||||||
|
TitleChanged {},
|
||||||
|
FontSizeChanged {},
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
|
@ -243,8 +245,12 @@ mod song_model {
|
||||||
Ok(_i) => {
|
Ok(_i) => {
|
||||||
if let Some(song) = self.as_mut().songs_mut().get_mut(index as usize) {
|
if let Some(song) = self.as_mut().songs_mut().get_mut(index as usize) {
|
||||||
song.title = updated_title.to_string();
|
song.title = updated_title.to_string();
|
||||||
self.as_mut()
|
self.as_mut().emit(Signals::DataChanged {
|
||||||
.emit_data_changed(model_index, model_index, &vector_roles);
|
top_left: &model_index,
|
||||||
|
bottom_right: &model_index,
|
||||||
|
roles: &vector_roles,
|
||||||
|
});
|
||||||
|
self.as_mut().emit_title_changed();
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue