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