File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
OMEdit/OMEditGUI/Modeling Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -3139,8 +3139,17 @@ void LibraryWidget::saveAsLibraryTreeItem(LibraryTreeItem *pLibraryTreeItem)
31393139 if (pLibraryTreeItem->getModelWidget () && !pLibraryTreeItem->getModelWidget ()->validateText (&pLibraryTreeItem)) {
31403140 return ;
31413141 }
3142- DuplicateClassDialog *pDuplicateClassDialog = new DuplicateClassDialog (true , pLibraryTreeItem, mpMainWindow);
3143- pDuplicateClassDialog->exec ();
3142+ if (pLibraryTreeItem->getLibraryType () == LibraryTreeItem::Modelica) {
3143+ DuplicateClassDialog *pDuplicateClassDialog = new DuplicateClassDialog (true , pLibraryTreeItem, mpMainWindow);
3144+ pDuplicateClassDialog->exec ();
3145+ } else if (pLibraryTreeItem->getLibraryType () == LibraryTreeItem::MetaModel) {
3146+ saveMetaModelLibraryTreeItem (pLibraryTreeItem);
3147+ } else if (pLibraryTreeItem->getLibraryType () == LibraryTreeItem::Text) {
3148+ saveMetaModelLibraryTreeItem (pLibraryTreeItem);
3149+ } else {
3150+ QMessageBox::information (this , Helper::applicationName + " - " + Helper::error, GUIMessages::getMessage (GUIMessages::ERROR_OCCURRED)
3151+ .arg (tr (" Unable to save the file, unknown library type." )), Helper::ok);
3152+ }
31443153}
31453154
31463155/* !
You can’t perform that action at this time.
0 commit comments