Skip to content

Commit

Permalink
Do not show unload/delete option for nested system libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Nov 20, 2015
1 parent 33a1a06 commit d5b12e2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -2174,7 +2174,12 @@ void LibraryTreeView::showContextMenu(QPoint point)
mpUnloadClassAction->setText(Helper::deleteStr);
mpUnloadClassAction->setStatusTip(tr("Deletes the Modelica class"));
}
menu.addAction(mpUnloadClassAction);
// only add unload/delete option for top level system libraries
if (!pLibraryTreeItem->isSystemLibrary()) {
menu.addAction(mpUnloadClassAction);
} else if (pLibraryTreeItem->isSystemLibrary() && pLibraryTreeItem->isTopLevel()) {
menu.addAction(mpUnloadClassAction);
}
/* Only used for development testing. */
/*menu.addAction(mpRefreshAction);*/
}
Expand Down

0 comments on commit d5b12e2

Please sign in to comment.