File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ private void BuildContextMenu(ContextualMenuPopulateEvent evt)
4343
4444 private void BuildNodeContext ( ContextualMenuPopulateEvent evt , NodeView nodeView )
4545 {
46- evt . menu . AppendAction ( "Delete" , action
46+ evt . menu . AppendAction ( "Delete" , action
4747 => OnDeleteStateNode ? . Invoke ( nodeView ) ) ;
4848
4949 if ( _graphView . selection . Count > 0 )
Original file line number Diff line number Diff line change 11using System . Linq ;
22using Nonatomic . VSM2 . Editor . NodeGraph ;
3- using Nonatomic . VSM2 . Editor . Persistence ;
43using Nonatomic . VSM2 . StateGraph ;
54using UnityEditor ;
65using UnityEngine ;
Original file line number Diff line number Diff line change @@ -278,15 +278,8 @@ private void HandlePasteSelected()
278278 private void HandleDeleteSelection ( )
279279 {
280280 if ( GuardUtils . GuardAgainstRuntimeOperation ( ) ) return ;
281-
282- for ( var index = this . selection . Count - 1 ; index >= 0 ; index -- )
283- {
284- var item = this . selection [ index ] ;
285- if ( item is VisualElement element )
286- {
287- element . RemoveFromHierarchy ( ) ;
288- }
289- }
281+
282+ DeleteSelection ( ) ;
290283 }
291284
292285 private void HandleDeleteStateNode ( NodeView nodeView )
You can’t perform that action at this time.
0 commit comments