mirror of
https://codeberg.org/StreamGraph/StreamGraph.git
synced 2024-11-13 19:49:55 +01:00
fix scroll offset not loading (#114)
closes #77 Reviewed-on: https://codeberg.org/StreamGraph/StreamGraph/pulls/114 Co-authored-by: Lera Elvoé <yagich@poto.cafe> Co-committed-by: Lera Elvoé <yagich@poto.cafe>
This commit is contained in:
parent
d5550be77d
commit
822abb3d66
1 changed files with 5 additions and 1 deletions
|
@ -126,13 +126,13 @@ func get_node_renderer(node: DeckNode) -> DeckNodeRendererGraphNode:
|
|||
func _on_scroll_offset_changed(offset: Vector2) -> void:
|
||||
deck.set_meta("offset", offset)
|
||||
|
||||
|
||||
## Setups all the data from the set [member deck] in this [DeckRendererGraphEdit]
|
||||
func initialize_from_deck() -> void:
|
||||
change_dirty = false
|
||||
for i in get_children():
|
||||
i.queue_free()
|
||||
|
||||
scroll_offset = deck.get_meta("offset", Vector2())
|
||||
is_group = deck.is_group
|
||||
for node_id in deck.nodes:
|
||||
var node_renderer: DeckNodeRendererGraphNode = NODE_SCENE.instantiate()
|
||||
|
@ -143,6 +143,10 @@ func initialize_from_deck() -> void:
|
|||
dirty = false
|
||||
|
||||
refresh_connections()
|
||||
|
||||
var ofs = deck.get_meta("offset", Vector2())
|
||||
set_scroll_offset.call_deferred(ofs)
|
||||
|
||||
|
||||
## Loops through all [DeckNode]s in [member Deck.nodes] and calls
|
||||
## [method GraphEdit.connect_node] for all the connections that exist in each
|
||||
|
|
Loading…
Reference in a new issue