Skip to content

Commit

Permalink
ticket:4607 Update the model after generateVerificationScenarios call.
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Nov 7, 2017
1 parent 63db4c6 commit 0e80fa1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions OMEdit/OMEditGUI/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -463,6 +463,9 @@ void LibraryTreeItem::setClassInformation(OMCInterface::getClassInformation_res
* \return
*/
bool LibraryTreeItem::isFilePathValid() {
if (mFileName.isEmpty()) {
return false;
}
// Since now we set the fileName via loadString() & parseString() so might get filename as className/<interactive>.
QFileInfo fileInfo(mFileName);
/* Ticket #3723
Expand Down Expand Up @@ -2063,6 +2066,17 @@ void LibraryTreeModel::generateVerificationScenarios(LibraryTreeItem *pLibraryTr
} else {
updateLibraryTreeItemClassText(pLibraryTreeItem);
}
/* generateVerificationScenarios deletes everything from the class and creates new scenario classes.
* Remove the LibraryTreeItems
* Load the newly created scenrario classes.
*/
int i = 0;
while(i < pLibraryTreeItem->childrenSize()) {
unloadClassChildren(pLibraryTreeItem->child(i));
i = 0; //Restart iteration
}
createLibraryTreeItems(pLibraryTreeItem);
updateLibraryTreeItem(pLibraryTreeItem);
}
}

Expand Down

0 comments on commit 0e80fa1

Please sign in to comment.