File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ func _on_block_canvas_add_block_code():
216
216
undo_redo .create_action ("Add block code for %s " % edited_node .name , UndoRedo .MERGE_DISABLE , edited_node )
217
217
218
218
undo_redo .add_do_method (edited_node , "add_child" , block_code , true )
219
+ undo_redo .add_do_method (self , "_select_node" , block_code )
219
220
undo_redo .add_do_property (block_code , "owner" , scene_root )
220
221
undo_redo .add_do_property (_context , "block_code_node" , block_code )
221
222
undo_redo .add_do_reference (block_code )
@@ -225,6 +226,11 @@ func _on_block_canvas_add_block_code():
225
226
undo_redo .commit_action ()
226
227
227
228
229
+ func _select_node (node : Node ):
230
+ EditorInterface .get_selection ().clear ()
231
+ EditorInterface .get_selection ().add_node (node )
232
+
233
+
228
234
func _on_block_canvas_open_scene ():
229
235
var edited_node : Node = EditorInterface .get_inspector ().get_edited_object () as Node
230
236
You can’t perform that action at this time.
0 commit comments