[Mac] Startup dialog appears when opening MuseScore and restoring session

• Jul 13, 2013 - 19:51
Type
Functional
Severity
3
Status
closed
Project

1. Open MuseScore via file (e.g. 'Open With').

Desired result: Score opens without dialog box.
Actual result: Score opens with dialog box.

Discussion: It gets in the way and you can't close it, unless you choose one of the buttons and 'Cancel'.

Using MuseScore 2.0 Nightly Build (e7687e5) - Mac 10.7.5.


Comments

Is this a Mac-only problem? As I can't reproduce it with Windows (7 Enterprise 64bit) and 6dffde5

Here's what I believe to be the relevant code, at the end of ...mscore/musescore.cpp:
{syntaxhighlighter brush:cpp}
if (preferences.sessionStart == EMPTY_SESSION && files == 0) {
QDialog* start = new StartDialog(0);
switch(start->exec()) {
case 1:
mscore->newFile();
break;
case 2:
mscore->loadFiles();
break;
}
}
return qApp->exec();
}
{/syntaxhighlighter}

Title Startup dialog appears when opening MuseScore via file, or restoring session [Mac] Startup dialog appears when opening MuseScore via file, or restoring session
Severity

I can't reproduce on Windows either, so yes, I think it is only on Mac.

How about Linux users?

Using MuseScore 2.0 Nightly Build (6dffde5) - Windows XP SP3.

There is some special Mac handling a bit further up in the code:
{syntaxhighlighter brush:cpp}
// count filenames specified on the command line
// these are the non-empty strings remaining in argv
foreach(const QString& name, argv) {
if (!name.isEmpty())
++files;
}
#ifdef Q_WS_MAC
// app->paths contains files requested to be loaded by OS X
// append these to argv and update file count
foreach(const QString& name, app->paths) {
if (!name.isEmpty()) {
argv << name;
++files;
}
}
#endif
{/syntaxhighlighter}

Does that need to get changed from Q_WS_MAC to Q_OS_MAC, as in other places?

Yes it appears with the Rev. 1cfa954 on a Mac (OSX 10.7.5)

It does not appear in Ubuntu mscore.64bits-2014-04-12-09-03-b424d8e. (Ubuntu 13.10)