File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -2145,7 +2145,10 @@ QString LibraryTreeModel::readLibraryTreeItemClassTextFromFile(LibraryTreeItem *
21452145 QString contents = " " ;
21462146 QFileInfo fileInfo (pLibraryTreeItem->getFileName ());
21472147 // if the file is encrypted use listFile
2148- if (fileInfo.suffix ().compare (" moc" ) == 0 ) {
2148+ if ((fileInfo.suffix ().compare (" moc" ) == 0 )
2149+ && (pLibraryTreeItem->getAccess () >= LibraryTreeItem::packageText
2150+ || (pLibraryTreeItem->getAccess () >= LibraryTreeItem::nonPackageText
2151+ && pLibraryTreeItem->getRestriction () != StringHandler::Package))) {
21492152 contents = MainWindow::instance ()->getOMCProxy ()->listFile (pLibraryTreeItem->getNameStructure ());
21502153 } else { // else read the file contents
21512154 QFile file (pLibraryTreeItem->getFileName ());
Original file line number Diff line number Diff line change @@ -4855,7 +4855,9 @@ void ModelWidget::getModelIconDiagramShapes(StringHandler::ViewType viewType)
48554855 QString annotationString;
48564856 if (viewType == StringHandler::Icon) {
48574857 pGraphicsView = mpIconGraphicsView;
4858- annotationString = pOMCProxy->getIconAnnotation (mpLibraryTreeItem->getNameStructure ());
4858+ if (mpLibraryTreeItem->getAccess () >= LibraryTreeItem::icon) {
4859+ annotationString = pOMCProxy->getIconAnnotation (mpLibraryTreeItem->getNameStructure ());
4860+ }
48594861 } else {
48604862 pGraphicsView = mpDiagramGraphicsView;
48614863 if (mpLibraryTreeItem->getAccess () >= LibraryTreeItem::diagram) {
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ QString Helper::OpenModelicaVersion = "";
4545QString Helper::OpenModelicaHome = " " ;
4646QString Helper::OpenModelicaLibrary = " " ;
4747QString Helper::OMCServerName = " OMEdit" ;
48- QString Helper::omFileTypes = " Modelica Files (*.mo)" ;
48+ QString Helper::omFileTypes = " All Modelica Files (*.mo *.mol);;Modelica Files (*.mo);;Encrypted Modelica Libraries (*.mol )" ;
4949QString Helper::omEncryptedFileTypes = " Encrypted Modelica Libraries (*.mol)" ;
5050QString Helper::omnotebookFileTypes = " OMNotebook Files (*.onb *.onbz *.nb)" ;
5151QString Helper::ngspiceNetlistFileTypes = " ngspice Netlist Files (*.cir *.sp *.spice)" ;
You can’t perform that action at this time.
0 commit comments