Default to false instead of null so we don't crash during DnD

This commit is contained in:
Reinhard Pointner 2018-06-29 02:06:55 +07:00
parent 74908608b1
commit 5fbe642d8e
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ import net.filebot.util.SystemProperty;
public class FileTransferable implements Transferable {
public static final SystemProperty<Boolean> forceSortOrder = SystemProperty.of("net.filebot.dnd.sort", Boolean::valueOf);
public static final SystemProperty<Boolean> forceSortOrder = SystemProperty.of("net.filebot.dnd.sort", Boolean::valueOf, false);
public static final DataFlavor uriListFlavor = createUriListFlavor();
@ -138,6 +138,8 @@ public class FileTransferable implements Transferable {
if (transferable instanceof List) {
List<File> files = (List<File>) transferable;
System.out.println(files);
// Windows Explorer DnD / Selection Order is broken and will probably never be fixed,
// so we provide an override for users that want to enforce alphanumeric sort order of files dragged in
if (forceSortOrder.get()) {