From e4aebb9b1f679b4a0ae36d0f47180c8101711eeb Mon Sep 17 00:00:00 2001 From: RodZill4 Date: Tue, 11 Sep 2018 21:43:40 +0200 Subject: [PATCH] Updated link to make it child of graph_edit control Should fix problems under Linux --- addons/material_maker/widgets/linked_widgets/link.gd | 2 +- .../widgets/linked_widgets/linked_control_base.gd | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/material_maker/widgets/linked_widgets/link.gd b/addons/material_maker/widgets/linked_widgets/link.gd index 0f19d84..368bb0b 100644 --- a/addons/material_maker/widgets/linked_widgets/link.gd +++ b/addons/material_maker/widgets/linked_widgets/link.gd @@ -11,7 +11,7 @@ func _ready(): func clip(p, s): clip_pos = p - rect_global_position = p + rect_global_position = Vector2(0, 0) rect_size = s rect_clip_content = true diff --git a/addons/material_maker/widgets/linked_widgets/linked_control_base.gd b/addons/material_maker/widgets/linked_widgets/linked_control_base.gd index e7d1a8c..74ee94b 100644 --- a/addons/material_maker/widgets/linked_widgets/linked_control_base.gd +++ b/addons/material_maker/widgets/linked_widgets/linked_control_base.gd @@ -62,7 +62,7 @@ func _on_mouse_entered(): link.clip(graph_edit.rect_global_position, graph_edit.rect_size) link.source = self link.target = w.widget - viewport.add_child(link) + graph_edit.add_child(link) links.append(link) func _on_mouse_exited(): @@ -124,7 +124,7 @@ func pick_linked(): link.clip(graph_edit.rect_global_position, graph_edit.rect_size) link.source = self link.end = rect_global_position+0.5*rect_size*get_global_transform().get_scale() - viewport.add_child(link) + graph_edit.add_child(link) set_process_input(true) pointed_control = null