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:
@@ -293,6 +293,12 @@ public abstract class RSWidgetMixin implements RSWidget
|
|||||||
@Override
|
@Override
|
||||||
public Widget[] getStaticChildren()
|
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>();
|
List<Widget> widgets = new ArrayList<Widget>();
|
||||||
for (RSWidget widget : client.getGroup(TO_GROUP(getId())))
|
for (RSWidget widget : client.getGroup(TO_GROUP(getId())))
|
||||||
{
|
{
|
||||||
@@ -308,6 +314,12 @@ public abstract class RSWidgetMixin implements RSWidget
|
|||||||
@Override
|
@Override
|
||||||
public Widget[] getNestedChildren()
|
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();
|
HashTable<WidgetNode> componentTable = client.getComponentTable();
|
||||||
|
|
||||||
WidgetNode wn = componentTable.get(getId());
|
WidgetNode wn = componentTable.get(getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user