mirror of
https://github.com/slint-ui/slint.git
synced 2025-07-24 13:35:00 +00:00
Add a changelog and fix flacky change_sub_property_indirection test
The test was only failing in some cases with node because of the inlining in the interpreter, and it depended in which order the property were processed (they were in a hash) A test property was added to also test the interpreter
This commit is contained in:
parent
6f3a73abd7
commit
be7bc66e6d
3 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,9 @@ All notable changes to this project are documented in this file.
|
|||
|
||||
### Changed
|
||||
|
||||
- When using a two way binding `foo <=> bar`, the default value will always be the one of `bar`.
|
||||
There was a warning about this change in previous versions (#1394)
|
||||
|
||||
### Added
|
||||
|
||||
- Added `material` style with `material-light` and `fluent-dark` as explicit styles
|
||||
|
|
|
@ -122,7 +122,7 @@ pub fn remove_aliases(component: &Rc<Component>, diag: &mut BuildDiagnostics) {
|
|||
// and if that was not set, we must still kee the default then
|
||||
let mut b = BindingExpression::from(Expression::default_value_for_type(&to.ty()));
|
||||
b.priority =
|
||||
to_elem.borrow_mut().bindings.get(to.name()).map_or(0, |x| x.borrow().priority);
|
||||
to_elem.borrow_mut().bindings.get(to.name()).map_or(0, |x| x.borrow().priority) + 1;
|
||||
b
|
||||
});
|
||||
|
||||
|
@ -131,7 +131,7 @@ pub fn remove_aliases(component: &Rc<Component>, diag: &mut BuildDiagnostics) {
|
|||
Entry::Occupied(mut e) => {
|
||||
let b = e.get_mut().get_mut();
|
||||
remove_from_binding_expression(b, &to);
|
||||
if b.priority <= old_binding.priority || !b.has_binding() {
|
||||
if b.priority < old_binding.priority || !b.has_binding() {
|
||||
b.merge_with(&old_binding);
|
||||
} else {
|
||||
old_binding.merge_with(b);
|
||||
|
|
|
@ -22,6 +22,7 @@ TestCase := Rectangle {
|
|||
}
|
||||
|
||||
property <string> sub_text <=> sub_alias.indirection;
|
||||
property <bool> test: sub_text == "ABC";
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue