Mercurial > octave
changeset 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 | cf8bb17e7193 |
children | faed660f7222 |
files | libgui/src/m-editor/file-editor.cc libgui/src/m-editor/file-editor.h |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
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);
--- a/libgui/src/m-editor/file-editor.h Thu Apr 19 19:12:35 2018 -0700 +++ b/libgui/src/m-editor/file-editor.h Sat Apr 21 22:27:17 2018 +0200 @@ -77,7 +77,7 @@ // struct that allows to sort with respect to the tab index struct session_data { - QString index; + int index; QString file_name; QString encoding;