Wizard model name saved to current model. Diacritics filtered out.
This commit is contained in:
@@ -188,7 +188,17 @@ void MdiChild::wizardEdit()
|
|||||||
WizardDialog *wizard = new WizardDialog(this);
|
WizardDialog *wizard = new WizardDialog(this);
|
||||||
wizard->exec();
|
wizard->exec();
|
||||||
if (wizard->mix.complete){
|
if (wizard->mix.complete){
|
||||||
//TODO Save data accessible in wizard->mix.
|
ModelData &model = radioData.models[row - 1];
|
||||||
|
|
||||||
|
// Remove dicritics and filter off anything but chars from the new model name
|
||||||
|
QString newName(wizard->mix.name.normalized(QString::NormalizationForm_D));
|
||||||
|
newName = newName.replace(QRegExp("[^a-zA-Z\\s]"), "");
|
||||||
|
strncpy(model.name, newName.toAscii(), sizeof(model.name));
|
||||||
|
model.name[sizeof(model.name)-1]=0;
|
||||||
|
|
||||||
|
//TODO Save the rest of the wizard->mix data to model.
|
||||||
|
|
||||||
|
setModified();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user