|
|
|
@ -86,14 +86,15 @@ namespace Avalonia.Diagnostics.ViewModels |
|
|
|
public void SelectControl(IControl control) |
|
|
|
{ |
|
|
|
var node = default(TreeNode); |
|
|
|
IControl? c = control; |
|
|
|
|
|
|
|
while (node == null && control != null) |
|
|
|
while (node == null && c != null) |
|
|
|
{ |
|
|
|
node = FindNode(control); |
|
|
|
node = FindNode(c); |
|
|
|
|
|
|
|
if (node == null) |
|
|
|
{ |
|
|
|
control = control.GetVisualParent<IControl>(); |
|
|
|
c = c.GetVisualParent<IControl>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|