private Map<String, InterfaceDefinition> interfaces;
private List<DataTypeDefinition> dataTypes;
private SubstitutionFilterDataDefinition substitutionFilter;
- private String model;
protected Component(ComponentMetadataDefinition componentMetadataDefinition) {
this.componentMetadataDefinition = componentMetadataDefinition;
return;
}
- if (!this.$scope.isCreateMode() && this.$scope.isVspImport()){
+ if (!this.$scope.isCreateMode() && this.$scope.isVspImport()) {
this.modelService.getModels().subscribe((modelsFound: Model[]) => {
modelsFound.sort().forEach(model => {
if (this.$scope.component.model != undefined) {
if (model.modelType == "NORMATIVE_EXTENSION") {
- this.$scope.component.model = model.derivedFrom;
+ if (this.$scope.component.model === model.name) {
+ this.$scope.component.model = model.derivedFrom;
+ }
this.$scope.models.push(model.derivedFrom)
} else {
- this.$scope.component.model = model.name;
this.$scope.models.push(model.name)
}
}
});
} else {
this.modelService.getModelsOfType("normative").subscribe((modelsFound: Model[]) => {
- modelsFound.sort().forEach(model => {this.$scope.models.push(model.name)});
+ modelsFound.sort().forEach(model => {
+ this.$scope.models.push(model.name)
+ });
});
}
};