完善画布焦点转移逻辑

This commit is contained in:
ww-rm
2025-09-19 00:56:25 +08:00
parent a24db3c447
commit 3d649e36cc
2 changed files with 7 additions and 7 deletions

View File

@@ -275,9 +275,12 @@ namespace SpineViewer.ViewModels.MainWindow
hit = true;
// 不管点到了哪个, 清空原先选中的, 改为只选中这一次点的, 强制触发一次选中项改变, 以及焦点转移到模型列表
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Reset));
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Add, sp));
// 如果点到了没被选中的东西, 清空原先选中的, 改为只选中这一次点的
if (!sp.IsSelected)
{
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Reset));
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Add, sp));
}
break;
}