Skip to content

Commit 5330d0d

Browse files
Merge pull request #112 from PaulNonatomic/feat/delete-selected
Feat/delete selected
2 parents a8c2c1b + ff89f12 commit 5330d0d

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
# [0.8.5-beta] - Sept 17, 2024
4+
- Fix for deleting a selection via the context menu
5+
36
## [0.8.4-beta] - Sept 11, 2024
47
- SharedData.ClearData is now Obsolete and will be removed in a future release. Use SharedData.ClearAllData instead.
58
- Added SharedData.ClearAllData method to clear all shared data.

Editor/StateGraph/StateGraphContextMenu.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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)

Editor/StateGraph/StateNodeGraphStateManager.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using System.Linq;
22
using Nonatomic.VSM2.Editor.NodeGraph;
3-
using Nonatomic.VSM2.Editor.Persistence;
43
using Nonatomic.VSM2.StateGraph;
54
using UnityEditor;
65
using UnityEngine;

Editor/StateGraph/VisualElements/StateGraphView.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,7 @@ private void HandleDeleteSelection()
279279
{
280280
if (GuardUtils.GuardAgainstRuntimeOperation()) return;
281281

282-
var selectedNodeModels = selection
283-
.OfType<NodeView>()
284-
.ToList();
285-
286-
DeleteNodes(selectedNodeModels);
282+
DeleteSelection();
287283
}
288284

289285
private void HandleDeleteStateNode(NodeView nodeView)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.nonatomic.visualstatemachinev2",
3-
"version": "0.8.4-beta",
3+
"version": "0.8.5-beta",
44
"displayName": "Visual State Machine V2",
55
"description": "Visual State Machine V2",
66
"unity": "2022.3",

0 commit comments

Comments
 (0)