slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.94k stars 568 forks source link

Values are not properly set, when listview is not at beginning #3740

Closed qarmin closed 10 months ago

qarmin commented 11 months ago

From issue https://github.com/slint-ui/slint/issues/2598#issuecomment-1773863372 - looks that this is different problem

Tested on latest 1.3.0 branch with applied 78d273e59956a6df2642ebb501a3d9465d7e035d(this fixed problem with invalid internal state btw)

When using slintpad link or slint-rust-template.zip

selecting and deselecting elements when listview is not scrolled works fine, but start to break when items are scrolled

https://github.com/slint-ui/slint/assets/41945903/ff0c6fcb-6232-4a0d-bb45-22548cd139ca

At video:

ogoffart commented 10 months ago

Thanks for the bug report. I can reproduce the problem: The ListView track the model data at the wrong index when scrolled.