Replace spaces in model name with underscores for file name (#5335)

This commit is contained in:
Neil Horne
2017-11-08 21:33:12 +01:00
committed by Andre Bernet
parent 1ef1109b5f
commit 5bb759a0e7
+3 -1
View File
@@ -38,7 +38,9 @@ ChecklistDialog::ChecklistDialog(QWidget *parent, const QString modelName):
setWindowIcon(CompanionIcon("edit.png"));
mChecklistFolder = g.profile[g.id()].sdPath() + "/MODELS/";
mModelChecklist = mChecklistFolder + modelName + ".txt";
QString name = modelName;
name.replace(" ", "_");
mModelChecklist = mChecklistFolder + name + ".txt";
ui->file->setText("File: " + mModelChecklist);
ui->pteCheck->setPlainText(readFile(mModelChecklist,QFile::exists(mModelChecklist)));