Skip to content

Commit

Permalink
Made sure old interfaces are removed before fetching new ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
robbr48 committed Apr 8, 2016
1 parent 3d9e047 commit b319531
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions OMEdit/OMEditGUI/Editors/MetaModelEditor.cpp
Expand Up @@ -434,6 +434,9 @@ void MetaModelEditor::addInterfacesData(QDomElement interfaces)
QDomNodeList subModelList = mXmlDocument.elementsByTagName("SubModel");
for (int i = 0 ; i < subModelList.size() ; i++) {
QDomElement subModel = subModelList.at(i).toElement();
while(!subModel.firstChildElement("InterfacePoint").isNull()) { //First remove all existing interfaces!
subModel.removeChild(subModel.firstChildElement("InterfacePoint"));
}
QDomElement interfaceDataElement = interfaces.firstChildElement();
while (!interfaceDataElement.isNull()) {
subModel = subModelList.at(i).toElement();
Expand Down

0 comments on commit b319531

Please sign in to comment.