Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Use try catch for omc APIs.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25179 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Mar 20, 2015
1 parent 71e1aec commit 397fdbe
Show file tree
Hide file tree
Showing 3 changed files with 237 additions and 85 deletions.
3 changes: 1 addition & 2 deletions OMEdit/OMEditGUI/Editors/ModelicaTextEditor.cpp
Expand Up @@ -477,8 +477,7 @@ void ModelicaTextEditor::toggleCommentSelection()
//! @param text the string to set.
void ModelicaTextEditor::setPlainText(const QString &text)
{
if (text != toPlainText())
{
if (text != toPlainText()) {
mForceSetPlainText = true;
QPlainTextEdit::setPlainText(text);
mForceSetPlainText = false;
Expand Down
5 changes: 1 addition & 4 deletions OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -1210,10 +1210,7 @@ bool LibraryTreeWidget::saveModelicaLibraryTreeNode(LibraryTreeNode *pLibraryTre
if (pLibraryTreeNode->getFileName().isEmpty() && pLibraryTreeNode->getSaveContentsType() == LibraryTreeNode::SaveInOneFile) {
result = saveLibraryTreeNodeOneFileHelper(pLibraryTreeNode);
}
/* A sub model contained inside some other model.
* Find its root model.
* If its a new model then its fileName is <interactive> then check its mSaveContentsType.
* If mSaveContentsType is LibraryTreeNode::SaveFolderStructure then we save sub models in folder structure
/* If mSaveContentsType is LibraryTreeNode::SaveFolderStructure then we save sub models in folder structure
*/
else if (pLibraryTreeNode->getFileName().isEmpty() && pLibraryTreeNode->getSaveContentsType() == LibraryTreeNode::SaveFolderStructure) {
result = saveLibraryTreeNodeFolderHelper(pLibraryTreeNode);
Expand Down

0 comments on commit 397fdbe

Please sign in to comment.