Skip to content

Commit

Permalink
Reset the inherited classes before fetching the new ones (#7289)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Mar 11, 2021
1 parent fcc2724 commit a657de5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp
Expand Up @@ -5314,17 +5314,17 @@ bool ModelWidget::modelicaEditorTextChanged(LibraryTreeItem **pLibraryTreeItem)
}
/* if user has changed the class contents then refresh it. */
if (className.compare(mpLibraryTreeItem->getNameStructure()) == 0) {
/* before calling the updateChildClasses() which calls reDrawModelWidget()
* we need to remove the inherited classes connect signal/slot of all classes.
*/
ModelWidget::removeInheritedClasses(mpLibraryTreeItem);
mpLibraryTreeItem->setClassInformation(pOMCProxy->getClassInformation(mpLibraryTreeItem->getNameStructure()));
reDrawModelWidget();
mpLibraryTreeItem->setClassText(modelicaText);
if (mpLibraryTreeItem->isInPackageOneFile()) {
pParentLibraryTreeItem->setClassText(stringToLoad);
updateModelText();
}
/* before calling the updateChildClasses() which calls reDrawModelWidget()
* we need to remove the inherited classes connect signal/slot of all classes.
*/
ModelWidget::removeInheritedClasses(mpLibraryTreeItem);
// update child classes
updateChildClasses(mpLibraryTreeItem);
} else {
Expand Down

0 comments on commit a657de5

Please sign in to comment.