Merge pull request #774 from michaellass/reload-order

Open previously opened databases in correct order
This commit is contained in:
TheZ3ro 2017-07-28 00:16:16 +02:00 committed by GitHub
commit ece6969edf

View File

@ -131,7 +131,8 @@ int main(int argc, char** argv)
if (config()->get("OpenPreviousDatabasesOnStartup").toBool()) {
const QStringList filenames = config()->get("LastOpenedDatabases").toStringList();
for (const QString& filename : filenames) {
for (int ii = filenames.size()-1; ii >= 0; ii--) {
QString filename = filenames.at(ii);
if (!filename.isEmpty() && QFile::exists(filename)) {
mainWindow.openDatabase(filename, QString(), QString());
}