Sort image files added using "Add file(s)..." alphabetically,
authorCarl Hetherington <cth@carlh.net>
Thu, 7 Jan 2016 15:16:36 +0000 (15:16 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Jan 2016 15:16:36 +0000 (15:16 +0000)
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
src/wx/content_panel.cc

index 5dd493a4611a9a2186b51744bf985b94d83c1662..1988607a5e5a333025b414fd66f5722ecdace5c0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-07  c.hetherington  <cth@carlh.net>
+
+       * Sort image files added using "Add file(s)..." alphabetically
+       rather than trying to find numbers in the filenames.
+
 2016-01-07  Carl Hetherington  <cth@carlh.net>
 
        * Version 2.6.12 released.
index 59886229c9be06892c6e646e70e8be2d7b722985..6d4a118687027f695d9a8a98653f4bb11902984f 100644 (file)
@@ -40,8 +40,6 @@
 #include <boost/foreach.hpp>
 #include <iostream>
 
-#include "lib/image_filename_sorter.cc"
-
 using std::list;
 using std::string;
 using std::cout;
@@ -518,10 +516,11 @@ void
 ContentPanel::add_files (list<boost::filesystem::path> 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 */