Skip to content

Commit

Permalink
File widgets: sort list in drag-and-drop operation
Browse files Browse the repository at this point in the history
  • Loading branch information
imagejan committed Apr 8, 2022
1 parent 7bde4b2 commit 75109d1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -280,6 +281,7 @@ public static List<File> getFiles(
}
@SuppressWarnings({ "unchecked", "cast" })
List<File> listOfFiles = (List<File>) list;
Collections.sort(listOfFiles);
return listOfFiles;
}
catch (final UnsupportedFlavorException | IOException exc) {
Expand Down

0 comments on commit 75109d1

Please sign in to comment.