mirror of
https://github.com/4sval/FModel.git
synced 2026-06-22 07:50:10 -05:00
Defer SaveCachedPose node selection to ensure visual tree is ready
Co-authored-by: LoogLong <86428208+LoogLong@users.noreply.github.com>
This commit is contained in:
parent
e91dbffdd2
commit
164d065b05
|
|
@ -810,12 +810,17 @@ public partial class AnimGraphViewer
|
|||
else
|
||||
AddLayerTab(targetLayer);
|
||||
|
||||
// Select and highlight the SaveCachedPose node in the target layer
|
||||
if (_layerStates.TryGetValue(targetLayer, out var state) &&
|
||||
state.NodeVisuals.TryGetValue(savePoseNode, out var visual))
|
||||
// Select and highlight the SaveCachedPose node in the target layer.
|
||||
// Use Dispatcher.BeginInvoke to ensure the visual tree is fully updated
|
||||
// after the tab switch before attempting to select the node.
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
SelectNode(savePoseNode, visual.border);
|
||||
}
|
||||
if (_layerStates.TryGetValue(targetLayer, out var state) &&
|
||||
state.NodeVisuals.TryGetValue(savePoseNode, out var visual))
|
||||
{
|
||||
SelectNode(savePoseNode, visual.border);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user