10000 Do not reset canvas window when refreshing a BlockScript · endlessm/godot-block-coding@2ece94f · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ece94f

Browse files
dylanmccallmanuq
authored andcommitted
Do not reset canvas window when refreshing a BlockScript
1 parent 53d5a4a commit 2ece94f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

addons/block_code/ui/block_canvas/block_canvas.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ func bsd_selected(bsd: BlockScriptData):
100100

101101
var edited_node = EditorInterface.get_inspector().get_edited_object() as Node
102102

103-
_window.position = Vector2(0, 0)
104-
zoom = 1
103+
if bsd != _current_bsd:
104+
_window.position = Vector2(0, 0)
105+
zoom = 1
105106

106107
_window.visible = false
107108
_zoom_label.visible = false

0 commit comments

Comments
 (0)
0