Skip to content

Commit 47bb071

Browse files
committed
Sort filenames alphabetically when dragging and dropping from a file manager
1 parent 4c30569 commit 47bb071

File tree

3 files changed

+175
-167
lines changed

3 files changed

+175
-167
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ for future and past milestones.
162162
* Fixed `IndexError: list index out of range` when performing some operations or
163163
computations on groups of signals/images (e.g. "ROI extraction", "Peak detection",
164164
"Resize", etc.)
165+
* Drag and drop from a file manager: filenames are now sorted alphabetically
165166

166167
## DataLab Version 0.10.1 ##
167168

cdl/core/gui/panel/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ def handle_dropped_files(self, filenames: list[str] | None = None) -> None:
687687
None
688688
"""
689689
h5_fnames = [fname for fname in filenames if fname.endswith(".h5")]
690-
other_fnames = list(set(filenames) - set(h5_fnames))
690+
other_fnames = sorted(list(set(filenames) - set(h5_fnames)))
691691
if h5_fnames:
692692
self.mainwindow.open_h5_files(h5_fnames, import_all=True)
693693
if other_fnames:

0 commit comments

Comments
 (0)