Skip to content

Commit b2f26f2

Browse files
Takoooooodanwalmsley
authored andcommitted
Merge pull request #6807 from YohDeadfall/fix-event-debugging
Added lost lines in event debugging
1 parent 475d8b7 commit b2f26f2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Avalonia.Diagnostics/Diagnostics/ViewModels/EventTreeNode.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ void handler()
117117
_currentEvent.HandledBy = link;
118118
}
119119
}
120+
121+
if (!Dispatcher.UIThread.CheckAccess())
122+
Dispatcher.UIThread.Post(handler);
123+
else
124+
handler();
120125
}
121126

122127
private static bool BelongsToDevTool(IVisual v)

src/Avalonia.Diagnostics/Diagnostics/ViewModels/FiredEvent.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public void AddToChain(EventChainLink link)
6464
if (EventChain.Count > 0)
6565
{
6666
var prevLink = EventChain[EventChain.Count - 1];
67-
67+
6868
if (prevLink.Route != link.Route)
6969
{
7070
link.BeginsNewRoute = true;

0 commit comments

Comments
 (0)