Skip to content

Commit fc4e2ba

Browse files
julienamsellemEvergreen
authored andcommitted
[VFX] Remove error popup when cancelling a drag edge with escape key
Jira: UUM-61583 Steps to repro: - Create a new HDRP/URP project - Create a new VFX Graph - Create two operators that have incompatible slots (`Float` and `Sample Gradient` for instance) - Drag `Float` connection out and hover it over gradient input slot - Hit escape to cancel - Observe wrong type popup gets stuck and moves around with graph ![Unity_IrNrWdfUSY](https://media.github.cds.internal.unity3d.com/user/4003/files/2a6b8809-0eb9-4e74-bc33-dd4ed7e326b4) ![video](https://jira.unity3d.com/secure/attachment/1368545/WrontTypePopup.mp4)
1 parent 8ec2362 commit fc4e2ba

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXEdgeConnector.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,7 @@
22
using System.Linq;
33

44
using UnityEditor.Experimental.GraphView;
5-
using UnityEngine;
65
using UnityEngine.UIElements;
7-
using UnityEngine.Profiling;
8-
9-
using Type = System.Type;
10-
11-
12-
using PositionType = UnityEngine.UIElements.Position;
136

147
namespace UnityEditor.VFX.UI
158
{
@@ -62,6 +55,15 @@ protected override void OnMouseUp(MouseUpEvent e)
6255
view.StopEdgeDragInfo();
6356
}
6457

58+
protected override void Abort()
59+
{
60+
base.Abort();
61+
if (m_Anchor.GetFirstAncestorOfType<VFXView>() is { } view)
62+
{
63+
view.StopEdgeDragInfo();
64+
}
65+
}
66+
6567
static List<VisualElement> s_PickedList = new List<VisualElement>();
6668
}
6769
}

0 commit comments

Comments
 (0)