mixins: Don't show siblings in dynamic widget's child lists

dynamic widgets can't have non-dynamic children because the load code can't refer to them because they can't be fully qualified by id.
This commit is contained in:
Max Weber
2018-06-27 03:08:14 -06:00
committed by Adam
parent 799f8b1266
commit a96d13b6c9

View File

@@ -293,6 +293,12 @@ public abstract class RSWidgetMixin implements RSWidget
@Override
public Widget[] getStaticChildren()
{
if (getRSParentId() == getId())
{
// This is a dynamic widget, so it can't have static children
return new Widget[0];
}
List<Widget> widgets = new ArrayList<Widget>();
for (RSWidget widget : client.getGroup(TO_GROUP(getId())))
{
@@ -308,6 +314,12 @@ public abstract class RSWidgetMixin implements RSWidget
@Override
public Widget[] getNestedChildren()
{
if (getRSParentId() == getId())
{
// This is a dynamic widget, so it can't have nested children
return new Widget[0];
}
HashTable<WidgetNode> componentTable = client.getComponentTable();
WidgetNode wn = componentTable.get(getId());