Open Frzk opened 9 years ago
After discussing this with @SfietKonstantin, it seems that this might be due to remorse + QSortFilterProxyModel re-sorting causing some indexes mess. I still don't know how to fix this :-/
Some more testing :
I tried to remove the index from the process, and use an identifier instead (i.e. call parkingModel.toggleSelected(identifier)
instead of parkingModel.toggleSelected(index)
).
Sadly it doesn't work either... (result is the same). Sounds like the issue is definitely caused by the Remorse implementation.
Steps to reproduce:
Result: The nth parking lot is marked as Favorite and moved at the top of the SilicaListView, in the Favorites section. The remorse for the nth-1 one is moved to the nth-2 parking lot. At the end of the 2nd remorse, the nth-2 parking lot is marked as Favorite.
This doesn't happen when you:
But it also happens when:
Result: None of the 2 are unmarked !
Examples
Result: Gutenberg is marked as Favorite, Gare Courte Duree is marked as Favorite. Gare Wodli isn't marked as Favorite.
Result (after the 2 remorses are done): Gare Courte Duree and Gutenberg are still in the Favorites.