Merge pull request #837 from pozzif/Fix-FlexPanel-items-order

Fixed the order of the items in the FlexPanel
This commit is contained in:
NaBian authored and GitHub committed 2021-05-26 22:28:27 +08:00
commit 30578843f6
1 file changed
+6 -1
@@ -648,7 +648,12 @@ namespace HandyControl.Controls
public int Index { get; } public int Index { get; }
public int CompareTo(FlexItemInfo other) => Order.CompareTo(other.Order); public int CompareTo(FlexItemInfo other)
{
var orderCompare = Order.CompareTo(other.Order);
if (orderCompare != 0) return orderCompare;
return Index.CompareTo(other.Index);
}
} }
private struct FlexLineInfo private struct FlexLineInfo