模型属性面板项进行排序
This commit is contained in:
@@ -49,7 +49,7 @@ namespace SpineViewer.Extensions
|
|||||||
public static Rect GetCurrentBounds(this SpineObject self)
|
public static Rect GetCurrentBounds(this SpineObject self)
|
||||||
{
|
{
|
||||||
self.Skeleton.GetBounds(out var x, out var y, out var w, out var h);
|
self.Skeleton.GetBounds(out var x, out var y, out var w, out var h);
|
||||||
return new(x, y, w, h);
|
return new(x, y, Math.Max(w, 1e-6f), Math.Max(h, 1e-6f));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -49,15 +49,15 @@ namespace SpineViewer.ViewModels.MainWindow
|
|||||||
|
|
||||||
IEnumerable<string> commonSkinNames = _selectedObjects[0].Skins;
|
IEnumerable<string> commonSkinNames = _selectedObjects[0].Skins;
|
||||||
foreach (var obj in _selectedObjects.Skip(1)) commonSkinNames = commonSkinNames.Intersect(obj.Skins);
|
foreach (var obj in _selectedObjects.Skip(1)) commonSkinNames = commonSkinNames.Intersect(obj.Skins);
|
||||||
foreach (var name in commonSkinNames) _skins.Add(new(name, _selectedObjects));
|
foreach (var name in commonSkinNames.Order()) _skins.Add(new(name, _selectedObjects));
|
||||||
|
|
||||||
IEnumerable<string> commonSlotNames = _selectedObjects[0].SlotAttachments.Keys;
|
IEnumerable<string> commonSlotNames = _selectedObjects[0].SlotAttachments.Keys;
|
||||||
foreach (var obj in _selectedObjects.Skip(1)) commonSlotNames = commonSlotNames.Intersect(obj.SlotAttachments.Keys);
|
foreach (var obj in _selectedObjects.Skip(1)) commonSlotNames = commonSlotNames.Intersect(obj.SlotAttachments.Keys);
|
||||||
foreach (var name in commonSlotNames) _slots.Add(new(name, _selectedObjects));
|
foreach (var name in commonSlotNames.Order()) _slots.Add(new(name, _selectedObjects));
|
||||||
|
|
||||||
IEnumerable<int> commonTrackIndices = _selectedObjects[0].GetTrackIndices();
|
IEnumerable<int> commonTrackIndices = _selectedObjects[0].GetTrackIndices();
|
||||||
foreach (var obj in _selectedObjects.Skip(1)) commonTrackIndices = commonTrackIndices.Intersect(obj.GetTrackIndices());
|
foreach (var obj in _selectedObjects.Skip(1)) commonTrackIndices = commonTrackIndices.Intersect(obj.GetTrackIndices());
|
||||||
foreach (var idx in commonTrackIndices) _animationTracks.Add(new(idx, _selectedObjects));
|
foreach (var idx in commonTrackIndices.Order()) _animationTracks.Add(new(idx, _selectedObjects));
|
||||||
}
|
}
|
||||||
|
|
||||||
OnPropertyChanged();
|
OnPropertyChanged();
|
||||||
|
|||||||
Reference in New Issue
Block a user