Skip to content

Commit

Permalink
fix #21821: [Mac] Startup dialog appears when opening MuseScore and r…
Browse files Browse the repository at this point in the history
…estoring session
  • Loading branch information
lasconic committed Feb 23, 2015
1 parent 704c076 commit 3f0a525
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mscore/musescore.cpp
Expand Up @@ -4927,6 +4927,7 @@ int main(int argc, char* av[])
mscore->setRevision(revision);

int files = 0;
bool restoredSession = false;
if (MScore::noGui) {
#ifdef Q_OS_MAC
// see issue #28706: Hangup in converter mode with MusicXML source
Expand Down Expand Up @@ -4960,7 +4961,8 @@ int main(int argc, char* av[])
//
// TODO: delete old session backups
//
if (!mscore->restoreSession((preferences.sessionStart == SessionStart::LAST) && (files == 0)) || files)
restoredSession = mscore->restoreSession((preferences.sessionStart == SessionStart::LAST && (files == 0)));
if (!restoredSession || files)
loadScores(argv);
}
errorMessage = new QErrorMessage(mscore);
Expand All @@ -4979,7 +4981,7 @@ int main(int argc, char* av[])
if (mscore->hasToCheckForUpdate())
mscore->checkForUpdate();

if (!scoresOnCommandline && preferences.showStartcenter) {
if (!scoresOnCommandline && preferences.showStartcenter && !restoredSession) {
getAction("startcenter")->setChecked(true);
mscore->showStartcenter(true);
}
Expand Down

0 comments on commit 3f0a525

Please sign in to comment.