new wizard fix: second try

This commit is contained in:
ws 2014-12-22 14:43:00 +01:00
parent b3adb9a84a
commit 3a505a0a1f
3 changed files with 13 additions and 4 deletions

View file

@ -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);

View file

@ -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";
}
}

View file

@ -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;
};