Prevent auto-selecting card in image view when filters change

This commit is contained in:
drdev
2014-05-24 20:13:38 +00:00
parent 55bacc8f10
commit abc441fb01

View File

@@ -277,15 +277,8 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
@Override @Override
protected void fixSelection(final Iterable<T> itemsToSelect, final int backupIndexToSelect, final float scrollValueToRestore) { protected void fixSelection(final Iterable<T> itemsToSelect, final int backupIndexToSelect, final float scrollValueToRestore) {
if (itemsToSelect == null) { clearSelection(); //just clear selection instead of fixing selection this way
clearSelection(); //just clear selection if no items to select setScrollValue(scrollValueToRestore); //ensure scroll value restored
setScrollValue(scrollValueToRestore); //ensure scroll value restored
}
else {
if (!setSelectedItems(itemsToSelect)) {
setSelectedIndex(backupIndexToSelect);
}
}
} }
public int getColumnCount() { public int getColumnCount() {