mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
refresh visual connections in deck renderer when duplicating nodes
This commit is contained in:
parent
440ec5bb2e
commit
c243d24028
1 changed files with 9 additions and 2 deletions
|
@ -151,8 +151,7 @@ func _on_deck_node_added(node: DeckNode) -> void:
|
||||||
inst.node = node
|
inst.node = node
|
||||||
add_child(inst)
|
add_child(inst)
|
||||||
inst.position_offset = inst.node.position_as_vector2()
|
inst.position_offset = inst.node.position_as_vector2()
|
||||||
clear_connections()
|
|
||||||
refresh_connections()
|
|
||||||
|
|
||||||
## Connected to [signal Deck.node_added], used to remove the specified
|
## Connected to [signal Deck.node_added], used to remove the specified
|
||||||
## [DeckNodeRendererGraphNode] and queue_free it.
|
## [DeckNodeRendererGraphNode] and queue_free it.
|
||||||
|
@ -258,8 +257,12 @@ func _on_paste_nodes_request() -> void:
|
||||||
if snapping_enabled:
|
if snapping_enabled:
|
||||||
node_pos = node_pos.snapped(Vector2(snapping_distance, snapping_distance))
|
node_pos = node_pos.snapped(Vector2(snapping_distance, snapping_distance))
|
||||||
|
|
||||||
|
clear_connections()
|
||||||
|
|
||||||
deck.paste_nodes_from_json(clip, node_pos)
|
deck.paste_nodes_from_json(clip, node_pos)
|
||||||
|
|
||||||
|
refresh_connections()
|
||||||
|
|
||||||
|
|
||||||
func _on_duplicate_nodes_request() -> void:
|
func _on_duplicate_nodes_request() -> void:
|
||||||
var selected := get_selected_nodes()
|
var selected := get_selected_nodes()
|
||||||
|
@ -272,4 +275,8 @@ func _on_duplicate_nodes_request() -> void:
|
||||||
return x.node._id
|
return x.node._id
|
||||||
))
|
))
|
||||||
|
|
||||||
|
clear_connections()
|
||||||
|
|
||||||
deck.duplicate_nodes(selected_ids)
|
deck.duplicate_nodes(selected_ids)
|
||||||
|
|
||||||
|
refresh_connections()
|
||||||
|
|
Loading…
Reference in a new issue