mixins: use last non-null child to determine index for new widgets

This commit is contained in:
trimbe
2019-03-12 12:41:42 -04:00
parent 849e044bb0
commit 8285bc80ca

View File

@@ -519,7 +519,15 @@ public abstract class RSWidgetMixin implements RSWidget
}
else
{
index = siblings.length;
index = 0;
for (int i = siblings.length - 1; i >= 0; i--)
{
if (siblings[i] != null)
{
index = i + 1;
break;
}
}
}
}