Fix deck sort logic

This commit is contained in:
drdev
2014-01-14 02:19:51 +00:00
parent 777dff3c4b
commit 5bd450e0c9
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
} }
} }

View File

@@ -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);
} }