Skip to content

Commit

Permalink
Fix display of class comment in the documentation view (OpenModelica#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Jun 13, 2024
1 parent c074295 commit 44cf517
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions OMEdit/OMEditLIB/OMC/OMCProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,14 +1535,11 @@ QString OMCProxy::getDocumentationAnnotation(LibraryTreeItem *pLibraryTreeItem)
QList<QString> docsList = mpOMCInterface->getDocumentationAnnotation(pLibraryTreeItem->getNameStructure());
QString infoHeader = "";
infoHeader = getDocumentationAnnotationInfoHeader(pLibraryTreeItem->parent(), infoHeader);
QString doc = "";
// get the model name and show it as the first line on the documentation page.
doc = "<h2>" % pLibraryTreeItem->getNameStructure() % "</h2>" ;

// get the model description if available (e.g) model a "test sample" end a;
QString description = getClassComment(pLibraryTreeItem->getNameStructure());
if (!doc.isEmpty()) {
doc = doc % " <p> <i>" % description % "</i> </p>";
QString doc = "<h2>" % pLibraryTreeItem->getNameStructure() % "</h2>";
// get the class comment if available e.g., model a "test sample" end a;
QString comment = getClassComment(pLibraryTreeItem->getNameStructure());
if (!comment.isEmpty()) {
doc = doc % "<h4>" % comment % "</h4>";
}

for (int ele = 0 ; ele < docsList.size() ; ele++) {
Expand Down

0 comments on commit 44cf517

Please sign in to comment.