-
Notifications
You must be signed in to change notification settings - Fork 627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dirty model property shouldn't cause re-creation of all elements in a for
#7245
Comments
Thanks for the report and reduction. AFAICS the issue is that Differently put:
I'm not sure if or how we can fix that. Seeking @ogoffart 's opinion before completing triaging. |
Ah! That makes sense. Ok, that gives me a better idea of how best to restructure my code if this turns out to be a "won't fix." Thanks again, and I'll watch this space. |
@tronical is correct. This could be mitigated with something like this: #1954 but this was reverted for good reason. But we could make that when the model actually didn't change (eg, pointer is the same value) then we don't re-create the elements |
That's a neat idea :) |
for
Being dirty is not enough Fixes #7245 ChangeLog: Elements of a `for` now only get re-created if the model is changed, not if it is only dirty
Being dirty is not enough Fixes #7245 ChangeLog: Elements of a `for` now only get re-created if the model is changed, not if it is only dirty
Being dirty is not enough Fixes #7245 ChangeLog: Elements of a `for` now only get re-created if the model is changed, not if it is only dirty
Being dirty is not enough Fixes #7245 ChangeLog: Elements of a `for` now only get re-created if the model is changed, not if it is only dirty
When the model is marked as dirty, it will cause all elements to be re-created.
Ideally, it shouldn't be re-created if the model didn't actually change
Original description
Bug Description
Animations don't trigger from state changes if they're on a component rendered inside a loop over a model where the model is a field in the same struct as the field whose change triggered the state change.
I would expect the window to fade to green when it is clicked, instead it snaps to green. (The bug doesn't occur if the two fields are in separate structs)
You can reproduce it by running
slint-viewer states.slint
, and clicking on the window.Reproducible Code
Environment Details
Product Impact
I'm currently working on a retrocomputing music editor (specifically a SID tracker), hobby project, likely freeware.
Mild cosmetic issue, noncritical (I can work around the bug by wrapping my list selection component in a dummy component that breaks up the {list,selected_id} pair).
The text was updated successfully, but these errors were encountered: