Skip to content

Commit

Permalink
Updated link to make it child of graph_edit control
Browse files Browse the repository at this point in the history
Should fix problems under Linux
  • Loading branch information
RodZill4 committed Sep 11, 2018
1 parent 4a504b0 commit e4aebb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion addons/material_maker/widgets/linked_widgets/link.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e4aebb9

Please sign in to comment.