选中项发生变化时转移焦点至模型列表
This commit is contained in:
@@ -275,12 +275,9 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
|
|
||||||
hit = true;
|
hit = true;
|
||||||
|
|
||||||
// 如果点到了没被选中的东西, 则清空原先选中的, 改为只选中这一次点的
|
// 不管点到了哪个, 都清空原先选中的, 改为只选中这一次点的, 强制触发一次选中项改变, 以及焦点转移到模型列表
|
||||||
if (!sp.IsSelected)
|
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Reset));
|
||||||
{
|
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Add, sp));
|
||||||
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Reset));
|
|
||||||
RequestSelectionChanging?.Invoke(this, new(NotifyCollectionChangedAction.Add, sp));
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -193,6 +193,9 @@ public partial class MainWindow : Window
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 选中项发生变化时转移焦点到列表
|
||||||
|
_spinesListView.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SpinesListView_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void SpinesListView_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
|||||||
Reference in New Issue
Block a user