Skip to content

Commit

Permalink
Do not mark the classes visible if any of children is public (#10757)
Browse files Browse the repository at this point in the history
Give preference to protected over public
  • Loading branch information
adeas31 committed May 29, 2023
1 parent 5527d07 commit 44b7584
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions OMEdit/OMEditLIB/Editors/ModelicaEditor.cpp
Expand Up @@ -438,6 +438,10 @@ bool ModelicaEditor::validateText(LibraryTreeItem **pLibraryTreeItem)
mLastValidText = mpPlainTextEdit->toPlainText();
}
}
/* Update the Libraries Browser when Modelica text change is done
* See discussion #10728
*/
MainWindow::instance()->getLibraryWidget()->getLibraryTreeModel()->showHideProtectedClasses();
return true;
}

Expand Down
7 changes: 0 additions & 7 deletions OMEdit/OMEditLIB/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -1116,13 +1116,6 @@ bool LibraryTreeProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
if (pLibraryTreeItem && pLibraryTreeItem->getNameStructure().compare("OMEdit.Search.Feature") == 0) {
return false;
}
// if any of children matches the filter, then current index matches the filter as well
int rows = sourceModel()->rowCount(index);
for (int i = 0 ; i < rows ; ++i) {
if (filterAcceptsRow(i, index)) {
return true;
}
}
// check current index itself
if (pLibraryTreeItem) {
if ((pLibraryTreeItem->getAccess() == LibraryTreeItem::hide
Expand Down

0 comments on commit 44b7584

Please sign in to comment.