mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Fix deck sort logic
This commit is contained in:
@@ -118,11 +118,12 @@ public class ItemColumn extends TableColumn {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSortPriority(final int sortPriority0) {
|
public void setSortPriority(final int sortPriority0) {
|
||||||
|
int oldSortPriority = this.sortPriority;
|
||||||
this.sortPriority = sortPriority0;
|
this.sortPriority = sortPriority0;
|
||||||
if (sortPriority0 == 0) {
|
if (sortPriority0 == 0) {
|
||||||
this.sortState = SortState.NONE;
|
this.sortState = SortState.NONE;
|
||||||
}
|
}
|
||||||
else {
|
else if (oldSortPriority == 0) {
|
||||||
this.sortState = def.sortState;
|
this.sortState = def.sortState;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -628,7 +628,6 @@ public final class ItemListView<T extends InventoryItem> extends ItemView<T> {
|
|||||||
|
|
||||||
//unset and remove boundary columns.
|
//unset and remove boundary columns.
|
||||||
if (this.colsToSort.size() > maxSortDepth) {
|
if (this.colsToSort.size() > maxSortDepth) {
|
||||||
this.colsToSort.get(maxSortDepth).setSortState(SortState.NONE);
|
|
||||||
this.colsToSort.get(maxSortDepth).setSortPriority(0);
|
this.colsToSort.get(maxSortDepth).setSortPriority(0);
|
||||||
this.colsToSort.remove(maxSortDepth);
|
this.colsToSort.remove(maxSortDepth);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user