mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Prevent auto-selecting card in image view when filters change
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user