This commit is contained in:
Nicolas Carion 2015-01-12 00:28:24 +01:00
parent 87587233f5
commit ec91968678

View file

@ -266,16 +266,16 @@ NewWizardPage4::NewWizardPage4(QWidget* parent)
templateFileBrowser->setStripNumbers(true);
QDir dir(mscoreGlobalShare + "/templates");
QFileInfoList fil = dir.entryInfoList(QDir::NoDotAndDotDot | QDir::Readable | QDir::Dirs | QDir::Files, QDir::Name);
QDir myTemplatesDir(preferences.myTemplatesPath);
fil.append(myTemplatesDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Readable | QDir::Dirs | QDir::Files, QDir::Name));
if(fil.isEmpty()){
fil.append(QFileInfo(QFile(":data/Empty_Score.mscz")));
}
templateFileBrowser->setScores(fil);
templateFileBrowser->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
QFileInfo myTemplates(preferences.myTemplatesPath);
if (myTemplates.isRelative())
myTemplates.setFile(QDir::home(), preferences.myTemplatesPath);
QLayout* layout = new QVBoxLayout;
layout->addWidget(templateFileBrowser);
setLayout(layout);