mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Fix itreem tree offsets of children of chained sub-components
Similar to commit 4eb161b83f
this works in C++
by accident but for Rust to compile we need to advance the sub-component
state in the tree builder.
This commit is contained in:
parent
a4c5d3d9aa
commit
0eb210933e
1 changed files with 7 additions and 1 deletions
|
@ -221,8 +221,14 @@ pub fn build_item_tree<T: ItemTreeBuilder>(
|
|||
// detect and chain the children visitation.
|
||||
if children.is_empty() {
|
||||
if let Some(nested_subcomponent) = parent_item.borrow().sub_component() {
|
||||
visit_children(
|
||||
let sub_component_state = builder.enter_component(
|
||||
parent_item,
|
||||
nested_subcomponent,
|
||||
children_offset,
|
||||
state,
|
||||
);
|
||||
visit_children(
|
||||
&sub_component_state,
|
||||
&nested_subcomponent.root_element.borrow().children,
|
||||
&nested_subcomponent,
|
||||
&nested_subcomponent.root_element,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue