Skip to content

Commit

Permalink
Exclude root LibraryTreeItem from LibraryTreeModel::findLibraryTreeIt…
Browse files Browse the repository at this point in the history
…em (#12226)

#12218
  • Loading branch information
adeas31 committed Apr 11, 2024
1 parent 5d80613 commit 9a80704
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions OMEdit/OMEditLIB/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -1370,8 +1370,7 @@ LibraryTreeItem* LibraryTreeModel::findLibraryTreeItem(const QString &name, Libr
{
if (!pLibraryTreeItem) {
pLibraryTreeItem = mpRootLibraryTreeItem;
}
if (pLibraryTreeItem->getNameStructure().compare(name, caseSensitivity) == 0) {
} else if (pLibraryTreeItem->getNameStructure().compare(name, caseSensitivity) == 0) {
return pLibraryTreeItem;
}
for (int i = pLibraryTreeItem->childrenSize(); --i >= 0; ) {
Expand Down

0 comments on commit 9a80704

Please sign in to comment.