Open previously opened databases in correct order

Databases are re-opened by traversing LastOpenedDatabases from front to
back, i.e. the last element in the list will be the active tab. However,
the most-recently used database is currently stored at the beginning of
the list. This leads to the least-recently used database to be the
ative tab on next startup.

Previously, this has been fixed in 4c76c97 by opening the databases in
reversed order. This change was accidentally reverted in 165d664.
Instead, change the order of LastOpenedDatabases itself, so no reversal
on opening the databases is necessary.

Resolves #1572
This commit is contained in:
Michael Lass 2018-03-03 11:10:55 +01:00 committed by Janek Bevendorff
parent a5dc1964a9
commit 97a890e8a0

View File

@ -933,7 +933,7 @@ void MainWindow::setShortcut(QAction* action, QKeySequence::StandardKey standard
void MainWindow::rememberOpenDatabases(const QString& filePath) void MainWindow::rememberOpenDatabases(const QString& filePath)
{ {
m_openDatabases.append(filePath); m_openDatabases.prepend(filePath);
} }
void MainWindow::applySettingsChanges() void MainWindow::applySettingsChanges()
@ -1150,4 +1150,4 @@ void MainWindow::closeAllDatabases()
void MainWindow::lockAllDatabases() void MainWindow::lockAllDatabases()
{ {
lockDatabasesAfterInactivity(); lockDatabasesAfterInactivity();
} }