Skip to content

Commit

Permalink
- formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alash325 committed Jun 10, 2015
1 parent 151140b commit c031a55
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -528,9 +528,9 @@ void GraphicsView::addComponentObject(Component *pComponent)
QDomElement docElem = doc.documentElement();
QDomElement subModels = docElem.firstChildElement();
while (!subModels.isNull()) {
if(subModels.tagName() == "SubModels") break;
subModels = subModels.nextSiblingElement();
}
if(subModels.tagName() == "SubModels") break;
subModels = subModels.nextSiblingElement();
}
QDomElement subModel = doc.createElement("SubModel");
subModel.setAttribute("Name", pComponent->getName());
subModel.setAttribute("StartCommand", "StartTLMOpenModelica");
Expand All @@ -544,11 +544,11 @@ void GraphicsView::addComponentObject(Component *pComponent)
annotation.setAttribute("Rotation", QString::number(pComponent->getTransformation()->getRotateAngle()));
subModel.appendChild(annotation);

subModels.appendChild(subModel);
QString metaModelText = doc.toString();
MainWindow *pMainWindow = mpModelWidget->getModelWidgetContainer()->getMainWindow();
pMainWindow->getModelWidgetContainer()->getCurrentModelWidget()->getEditor()->getPlainTextEdit()->setPlainText(metaModelText);
}
subModels.appendChild(subModel);
QString metaModelText = doc.toString();
MainWindow *pMainWindow = mpModelWidget->getModelWidgetContainer()->getMainWindow();
pMainWindow->getModelWidgetContainer()->getCurrentModelWidget()->getEditor()->getPlainTextEdit()->setPlainText(metaModelText);
}
// make the model modified
mpModelWidget->setModelModified();
// add the component to the local list
Expand Down

0 comments on commit c031a55

Please sign in to comment.