diff libgui/src/m-editor/file-editor.cc @ 25293:ae0518976e2b stable

open files in correct order when restoring editor session (bug #53711) * file-editor.cc (restore_session): use integers instead of string for sorting the tabs (avoiding 1 10 11 ... 2 3 ...) * file-editor.h: struct session data with integer instead of string as index
author Torsten <mttl@mailbox.org>
date Sat, 21 Apr 2018 22:27:17 +0200
parents 1f1e1e72e958
children 389757b7b6af ed2339e64a57
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor.cc	Thu Apr 19 19:12:35 2018 -0700
+++ b/libgui/src/m-editor/file-editor.cc	Sat Apr 21 22:27:17 2018 +0200
@@ -279,9 +279,9 @@
         if (! file.exists ())
           continue;
 
-        session_data item = { QString (), sessionFileNames.at (n), QString ()};
+        session_data item = { 0, sessionFileNames.at (n), QString ()};
         if (do_index)
-          item.index = session_index.at (n);
+          item.index = session_index.at (n).toInt ();
         if (do_encoding)
           item.encoding = session_encodings.at (n);