Incorrect tabs order in SciNotes when open file and Restore session
Reported by Nikolay Strelkov
BUG DESCRIPTION:
----------------
The problem is caused by wrong priority of newly opened file tab and restored tabs.
It exists in Scilab 5.5.2 and 6.0.0.
ERROR LOG:
----------
None
HOW TO REPRODUCE THE BUG:
-------------------------
1. Open Scilab, launch SciNotes, open some files in it, close Scilab.
2. Open Scilab again. Open somefile1.sci in SciNotes, then press "Ok" as answer for "Restore files form your last SciNotes session?"
3. All files are opened in SciNotes, but focus is located on the wrong tab (seems to be the last one from Restore, not somefile1.sci).
EXPECTED BEHAVIOR
------------------
SciNotes correctly restored session, somefile1.sci tab is active.
ACTUAL BEHAVIOR
------------------
SciNotes incorrectly restored session, somefile1.sci tab is randomly placed between other tabs. Last tab from previous session is active.