mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Fix computation of the item sub range
We need to account for the repeater count in the item sub-range
This commit is contained in:
parent
083023866d
commit
e04835d209
2 changed files with 2 additions and 1 deletions
|
@ -1839,6 +1839,7 @@ fn generate_sub_component(
|
|||
"}} else if (index >= {} && index < {}) {{",
|
||||
sub.index_of_first_child_in_tree,
|
||||
sub.index_of_first_child_in_tree + sub_items_count - 1
|
||||
+ sub.ty.repeater_count()
|
||||
));
|
||||
code.push(format!(
|
||||
" return self->{}.{name}(index - {}{forward_args});",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue