Skip to content

Commit 9108b13

Browse files
committed
Inverted null check when sorting stacks
1 parent d3f89ee commit 9108b13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cYo.Common.Windows/Forms/ItemView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,7 @@ private Rectangle CalcItemPositions(Graphics gr, bool withSort)
26702670
if (ItemStackSorter != null)
26712671
{
26722672
// Chain the stack sorter with the default ItemStackSorter if it exists
2673-
var stackSortComparer = stackSorter is not null ? ItemStackSorter.Chain(stackSorter) : ItemStackSorter; // Default comparer if no specific sorter is found
2673+
var stackSortComparer = stackSorter is null ? ItemStackSorter : ItemStackSorter.Chain(stackSorter); // Default comparer if no specific sorter is found
26742674
group.Items.Sort(stackSortComparer); // Sort the items in the group using the stack sorter
26752675
}
26762676
StackInfo stackInfo = new StackInfo(group);

0 commit comments

Comments
 (0)