diff --git a/mscore/file.cpp b/mscore/file.cpp index 88f8ad42e5..5924619112 100644 --- a/mscore/file.cpp +++ b/mscore/file.cpp @@ -475,7 +475,7 @@ void MuseScore::newFile() Score* score = new Score(MScore::defaultStyle()); QString tp = newWizard->templatePath(); - if (QFileInfo(tp).baseName() != "00-Blank") { + if (!newWizard->emptyScore()) { Score::FileError rv = Ms::readScore(score, tp, false); if (rv != Score::FileError::FILE_NO_ERROR) { readScoreError(newWizard->templatePath(), rv, false); diff --git a/mscore/newwizard.cpp b/mscore/newwizard.cpp index 77eaedb7f8..31a519c45a 100644 --- a/mscore/newwizard.cpp +++ b/mscore/newwizard.cpp @@ -433,9 +433,7 @@ int NewWizard::nextId() const case Page::Type: return int(Page::Template); case Page::Template: { - QString p = p4->templatePath(); - QFileInfo fi(p); - if (fi.baseName() == "00-Empty") + if (emptyScore()) return int(Page::Instruments); return int(Page::Keysig); } @@ -449,5 +447,15 @@ int NewWizard::nextId() const } } +//--------------------------------------------------------- +// emptyScore +//--------------------------------------------------------- + +bool NewWizard::emptyScore() const + { + QString p = p4->templatePath(); + QFileInfo fi(p); + return fi.baseName() == "00-Empty"; + } } diff --git a/mscore/newwizard.h b/mscore/newwizard.h index 68f5da15ef..a14efe9a40 100644 --- a/mscore/newwizard.h +++ b/mscore/newwizard.h @@ -199,6 +199,7 @@ class NewWizard : public QWizard { TimeSigType timesigType() const { return p3->timesigType(); } double tempo() const { return p5->tempo(); } bool createTempo() const { return p5->createTempo(); } + bool emptyScore() const; };