允许选择多项显示属性

This commit is contained in:
ww-rm
2025-02-27 18:46:26 +08:00
parent a6978e2bfe
commit 589b3f8a9a

View File

@@ -136,10 +136,13 @@ namespace SpineViewer
{
if (PropertyGrid is not null)
{
if (listView.SelectedIndices.Count == 1)
if (listView.SelectedIndices.Count <= 0)
PropertyGrid.SelectedObject = null;
else if (listView.SelectedIndices.Count <= 1)
PropertyGrid.SelectedObject = spines[listView.SelectedIndices[0]];
else
PropertyGrid.SelectedObject = null;
PropertyGrid.SelectedObjects = listView.SelectedIndices.Cast<int>().Select(index => spines[index]).ToArray();
}
}