search function for all models... however...
There is some sort of problem. Somehow I sometimes get a signal 11 SEGV_MAPERR error and then it segfaults. *sigh*... So this function needs some help yet.
This commit is contained in:
parent
114ffb5bdc
commit
5b0462db65
4 changed files with 120 additions and 15 deletions
|
@ -355,7 +355,6 @@ impl song_model::SongModel {
|
|||
println!("--------------------------------------");
|
||||
println!("{:?}", self.as_mut().songs);
|
||||
println!("--------------------------------------");
|
||||
self.as_mut().rust_mut().inner_songs = self.songs.clone();
|
||||
}
|
||||
|
||||
pub fn remove_item(mut self: Pin<&mut Self>, index: i32) -> bool {
|
||||
|
@ -380,6 +379,10 @@ impl song_model::SongModel {
|
|||
.rust_mut()
|
||||
.songs
|
||||
.remove(index as usize);
|
||||
self.as_mut()
|
||||
.rust_mut()
|
||||
.inner_songs
|
||||
.remove(index as usize);
|
||||
self.as_mut().end_remove_rows();
|
||||
}
|
||||
println!("removed-item-at-index: {:?}", song_id);
|
||||
|
@ -464,7 +467,8 @@ impl song_model::SongModel {
|
|||
index,
|
||||
index,
|
||||
);
|
||||
self.as_mut().rust_mut().songs.push(song);
|
||||
self.as_mut().rust_mut().songs.push(song.clone());
|
||||
self.as_mut().rust_mut().inner_songs.push(song);
|
||||
self.as_mut().end_insert_rows();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue