mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-24 05:26:29 +00:00
C++: fix the FilterModel's row_removed
Same fix as in the rust equivalent from previous commit
This commit is contained in:
parent
1a4528e447
commit
5e12f0876f
1 changed files with 1 additions and 5 deletions
|
@ -984,11 +984,7 @@ struct ReverseModelInner : private_api::ModelChangeListener
|
|||
|
||||
void row_removed(size_t first_removed_row, size_t count) override
|
||||
{
|
||||
auto row_count = source_model->row_count();
|
||||
auto old_row_count = row_count + count;
|
||||
auto row = old_row_count - first_removed_row - 1;
|
||||
|
||||
target_model.row_removed(row, count);
|
||||
target_model.row_removed(source_model->row_count() - first_removed_row, count);
|
||||
}
|
||||
|
||||
void reset() override { source_model.reset(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue