Skip to content

Commit 6131312

Browse files
committed
fix for #61
1 parent 34fe148 commit 6131312

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

haxe/ui/backend/ScreenImpl.hx

+5
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,17 @@ class ScreenImpl extends ScreenBase {
275275

276276
private override function handleSetComponentIndex(child:Component, index:Int) {
277277
var offset = 0;
278+
StateHelper.currentState.forEach((item) -> {
279+
offset++;
280+
});
281+
/* see: https://github.com/haxeui/haxeui-flixel/issues/61
278282
for (i in 0...StateHelper.currentState.length) {
279283
if ((StateHelper.currentState.members[i] is Component)) {
280284
offset = i;
281285
break;
282286
}
283287
}
288+
*/
284289

285290
StateHelper.currentState.remove(child, true);
286291
StateHelper.currentState.insert(index + offset, child);

0 commit comments

Comments
 (0)