fix(cpn): Add model with template crashed simulator (#2289)
This commit is contained in:
@@ -756,7 +756,6 @@ int MdiChild::newModel(int modelIndex)
|
|||||||
|
|
||||||
bool isNewModel = radioData.models[modelIndex].isEmpty();
|
bool isNewModel = radioData.models[modelIndex].isEmpty();
|
||||||
checkAndInitModel(modelIndex);
|
checkAndInitModel(modelIndex);
|
||||||
radioData.fixModelFilenames();
|
|
||||||
|
|
||||||
// Only set the default model if we just added the first one.
|
// Only set the default model if we just added the first one.
|
||||||
if (countUsedModels() == 1) {
|
if (countUsedModels() == 1) {
|
||||||
@@ -779,6 +778,7 @@ int MdiChild::newModel(int modelIndex)
|
|||||||
else if (g.newModelAction() == AppData::MODEL_ACT_EDITOR)
|
else if (g.newModelAction() == AppData::MODEL_ACT_EDITOR)
|
||||||
openModelEditWindow(modelIndex);
|
openModelEditWindow(modelIndex);
|
||||||
|
|
||||||
|
radioData.fixModelFilenames();
|
||||||
return modelIndex;
|
return modelIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1105,7 +1105,6 @@ void MdiChild::openModelWizard(int row)
|
|||||||
int res = wizard->exec();
|
int res = wizard->exec();
|
||||||
if (res == QDialog::Accepted && wizard->mix.complete /*TODO rather test the exec() result?*/) {
|
if (res == QDialog::Accepted && wizard->mix.complete /*TODO rather test the exec() result?*/) {
|
||||||
radioData.models[row] = wizard->mix;
|
radioData.models[row] = wizard->mix;
|
||||||
radioData.fixModelFilenames();
|
|
||||||
setModified();
|
setModified();
|
||||||
setSelectedModel(row);
|
setSelectedModel(row);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user