From f9482e2896031942784f870306e705d070ceac9d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 7 Jan 2016 15:16:36 +0000 Subject: [PATCH] Sort image files added using "Add file(s)..." alphabetically, as I think this is less surprising than trying to do it by number. Numerically-named files are much more likely to be added using "Add folder.." --- ChangeLog | 5 +++++ src/wx/content_panel.cc | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5dd493a46..1988607a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-01-07 c.hetherington + + * Sort image files added using "Add file(s)..." alphabetically + rather than trying to find numbers in the filenames. + 2016-01-07 Carl Hetherington * Version 2.6.12 released. diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 59886229c..6d4a11868 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -40,8 +40,6 @@ #include #include -#include "lib/image_filename_sorter.cc" - using std::list; using std::string; using std::cout; @@ -518,10 +516,11 @@ void ContentPanel::add_files (list paths) { /* It has been reported that the paths returned from e.g. wxFileDialog are not always sorted; - I can't reproduce that, but sort them anyway. + I can't reproduce that, but sort them anyway. Don't use ImageFilenameSorter as a normal + alphabetical sort is expected here. */ - paths.sort (ImageFilenameSorter ()); + paths.sort (); /* XXX: check for lots of files here and do something */ -- 2.30.2