File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1108,11 +1108,17 @@ def format_color(clr):
11081108
11091109 node .update ()
11101110
1111+ undo_cmd = NodeAddedCmd (self , node , node .model .pos )
11111112 if push_undo :
1112- undo_cmd = NodeAddedCmd (self , node , node .model .pos )
1113- undo_cmd .setText ('create node: "{}"' .format (node .NODE_NAME ))
1113+ undo_label = 'create node: "{}"' .format (node .NODE_NAME )
1114+ self ._undo_stack .beginMacro (undo_label )
1115+ for n in self .selected_nodes ():
1116+ n .set_property ('selected' , False , push_undo = True )
11141117 self ._undo_stack .push (undo_cmd )
1118+ self ._undo_stack .endMacro ()
11151119 else :
1120+ for n in self .selected_nodes ():
1121+ n .set_property ('selected' , False , push_undo = False )
11161122 NodeAddedCmd (self , node , node .model .pos ).redo ()
11171123
11181124 self .node_created .emit (node )
You can’t perform that action at this time.
0 commit comments