mixins: only update render parent of nested widget if widget would have been rendererd

This commit is contained in:
Adam
2018-07-21 22:49:22 -04:00
parent 2942b25e5d
commit 630a3947da

View File

@@ -1119,20 +1119,17 @@ public abstract class RSClientMixin implements RSClient
for (Widget rlWidget : widgets) for (Widget rlWidget : widgets)
{ {
RSWidget widget = (RSWidget) rlWidget; RSWidget widget = (RSWidget) rlWidget;
if (widget == null) if (widget == null || widget.getRSParentId() != parentId)
{ {
continue; continue;
} }
if (widget.getRSParentId() == parentId) if (parentId != -1)
{ {
if (parentId != -1) widget.setRenderParentId(parentId);
{
widget.setRenderParentId(parentId);
}
widget.setRenderX(x + widget.getRelativeX());
widget.setRenderY(y + widget.getRelativeY());
} }
widget.setRenderX(x + widget.getRelativeX());
widget.setRenderY(y + widget.getRelativeY());
HashTable<WidgetNode> componentTable = client.getComponentTable(); HashTable<WidgetNode> componentTable = client.getComponentTable();
WidgetNode childNode = componentTable.get(widget.getId()); WidgetNode childNode = componentTable.get(widget.getId());