[Mac] Startup dialog appears when opening MuseScore and restoring session
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
It also happens when restoring a session.
Using MuseScore 2.0 Nightly Build (06153cf) - Mac 10.7.5.
See duplicate: #24351: Load score screen should not appear when double-clicking a document
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}
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)
for 2.0beta1 I just commented out the startdialog 285d52f77f
Also see this, perhaps: #40051: Start Centre shown when opening application via file
Still happens in nightly build 11b49de and 2.0.0 beta 2 on Mac OS X Lion 10.7.5 (11G63).
This bug is about the restoring session case. See #40051: Start Centre shown when opening application via file for file open.
Fixed in 3f0a525565
Automatically closed -- issue fixed for 2 weeks with no activity.