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
ComboBox reset current on model changed #5217
Conversation
CHANGELOG.md
Outdated
- Fixed updating model of ComboBox does not change current-value | ||
- Fixed set current-index of ComboBox to -1 does not reset current-value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These actually belong in the Widget category.
Be carefull as well that if this is not merged before the release, it needs to be changed to a different version manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
I tried to debug this a little. It’s the inlining that breaks with change handlers. SLINT_INLINING=true reproduces the failure also for builds (gallery for example). It looks like the names references inside the change handlers aren’t adjusted correctly. From the code it looks like that should happen when processing the fix ups for the mapping, but something goes wrong. |
Minimal reproducer: component Test {
in-out property <int> index: 0;
changed index => {
debug(root.index);
}
}
export component Testcase {
in-out property index <=> t.index;
t := Test {}
} |
Even smaller test case, it's not related to inlining but declarations moving: export component Testcase {
t := Rectangle {
in-out property <int> index: 0;
changed index => {
}
}
} |
When eliminating a properyt, also make sure to remove associated change callbacks: ```slint export component Testcase { t := Rectangle { in-out property <int> index: 0; changed index => { } } } ```
When an observed property is renamed due to alias removal, make sure to update the name of the observed property: ```slint export component Testcase { in-out property index <=> t.index; t := Rectangle { in-out property <int> index: 0; changed index => { } } } ```
801a18f
to
77e318e
Compare
Fixes #5214
Fixes #3628