mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-03 18:29:09 +00:00
Fixed inlining updating property use count
This commit is contained in:
parent
5f77808d1c
commit
47028bce27
2 changed files with 2 additions and 2 deletions
|
@ -318,7 +318,6 @@ impl SubComponent {
|
|||
}
|
||||
true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pub struct SubComponentInstance {
|
||||
|
|
|
@ -165,10 +165,11 @@ fn inline_simple_expressions_in_expression(expr: &mut Expression, ctx: &Evaluati
|
|||
if let Some(prop_decl) = prop_info.property_decl {
|
||||
prop_decl.use_count.set(prop_decl.use_count.get() - 1);
|
||||
}
|
||||
adjust_use_count(expr, &ctx, 1);
|
||||
if use_count == 1 {
|
||||
adjust_use_count(&binding.expression.borrow(), &mapped_ctx, -1);
|
||||
binding.expression.replace(Expression::CodeBlock(vec![]));
|
||||
} else {
|
||||
adjust_use_count(expr, &ctx, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue