Skip to content

Commit

Permalink
offset regardless of component or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ianharrigan committed Oct 25, 2023
1 parent e10f51f commit 969eae3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions haxe/ui/backend/ScreenImpl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,8 @@ class ScreenImpl extends ScreenBase {

private override function handleSetComponentIndex(child:Component, index:Int) {
var offset = 0;
var componentFound = false;
StateHelper.currentState.forEach((item) -> {
if ((item is Component)) {
componentFound = true;
} else {
if (!componentFound) {
offset++;
}
}
offset++;
});

StateHelper.currentState.remove(child);
Expand Down

0 comments on commit 969eae3

Please sign in to comment.