Skip to content

Commit f7b8945

Browse files
iTris666Evergreen
authored andcommitted
[UUM-92486] stop propagation on debug window click
1 parent e0d218b commit f7b8945

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Packages/com.unity.visualeffectgraph/Editor/GraphView/Profiling/VFXProfilingBoard.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ public VFXProfilingBoard(VFXView view)
9595
capabilities |= Capabilities.Movable;
9696

9797
RegisterCallback<MouseDownEvent>(OnMouseClick);
98+
RegisterCallback<MouseUpEvent>(e=> e.StopPropagation());
9899
// Prevent graphview from zooming in/out when using the mouse wheel over the component board
99100
RegisterCallback<WheelEvent>(e => e.StopPropagation());
100101

@@ -167,6 +168,7 @@ public override void SetPosition(Rect newPos)
167168
void OnMouseClick(MouseDownEvent e)
168169
{
169170
m_View.SetBoardToFront(this);
171+
e.StopPropagation();
170172
}
171173

172174
public void Detach()

Packages/com.unity.visualeffectgraph/Editor/GraphView/VFXComponentBoard.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public VFXComponentBoard(VFXView view)
194194
capabilities |= Capabilities.Movable;
195195

196196
RegisterCallback<MouseDownEvent>(OnMouseClick);
197+
RegisterCallback<MouseUpEvent>(e=>e.StopPropagation());
197198
// Prevent graphview from zooming in/out when using the mouse wheel over the component board
198199
RegisterCallback<WheelEvent>(e => e.StopPropagation());
199200

@@ -230,6 +231,7 @@ public void SetDebugMode(VFXUIDebug.Modes mode)
230231
void OnMouseClick(MouseDownEvent e)
231232
{
232233
m_View.SetBoardToFront(this);
234+
e.StopPropagation();
233235
}
234236

235237
void OnMouseClickBoundsContainer(MouseDownEvent e)

0 commit comments

Comments
 (0)