Skip to content

Commit

Permalink
- Save as for meta models
Browse files Browse the repository at this point in the history
  • Loading branch information
alash325 committed Mar 10, 2016
1 parent 4b6af89 commit 7864f66
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -3139,8 +3139,17 @@ void LibraryWidget::saveAsLibraryTreeItem(LibraryTreeItem *pLibraryTreeItem)
if (pLibraryTreeItem->getModelWidget() && !pLibraryTreeItem->getModelWidget()->validateText(&pLibraryTreeItem)) {
return;
}
DuplicateClassDialog *pDuplicateClassDialog = new DuplicateClassDialog(true, pLibraryTreeItem, mpMainWindow);
pDuplicateClassDialog->exec();
if (pLibraryTreeItem->getLibraryType() == LibraryTreeItem::Modelica) {
DuplicateClassDialog *pDuplicateClassDialog = new DuplicateClassDialog(true, pLibraryTreeItem, mpMainWindow);
pDuplicateClassDialog->exec();
} else if (pLibraryTreeItem->getLibraryType() == LibraryTreeItem::MetaModel) {
saveMetaModelLibraryTreeItem(pLibraryTreeItem);
} else if (pLibraryTreeItem->getLibraryType() == LibraryTreeItem::Text) {
saveMetaModelLibraryTreeItem(pLibraryTreeItem);
} else {
QMessageBox::information(this, Helper::applicationName + " - " + Helper::error, GUIMessages::getMessage(GUIMessages::ERROR_OCCURRED)
.arg(tr("Unable to save the file, unknown library type.")), Helper::ok);
}
}

/*!
Expand Down

0 comments on commit 7864f66

Please sign in to comment.