diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index c4d8a9e14..209e6b7ad 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -134,13 +134,8 @@ MainWindow::MainWindow() : EnableProjectOpenActions(true); EnableProjectActions(false); - QStringList args = QCoreApplication::arguments(); - //Remove the application itself - args.removeFirst(); - if (!args.isEmpty()) { - HandleCLIParams(args); - } - + // Must setup MRU menu before CLI param handling as it can load a + // project file and update MRU menu. for (int i = 0; i < MaxRecentProjects; ++i) { mRecentProjectActs[i] = new QAction(this); mRecentProjectActs[i]->setVisible(false); @@ -151,6 +146,13 @@ MainWindow::MainWindow() : mUI.mActionProjectMRU->setVisible(false); UpdateMRUMenuItems(); + QStringList args = QCoreApplication::arguments(); + //Remove the application itself + args.removeFirst(); + if (!args.isEmpty()) { + HandleCLIParams(args); + } + for (int i = 0; i < mPlatforms.getCount(); i++) { Platform plat = mPlatforms.mPlatforms[i]; QAction *act = new QAction(this);