Skip to content

Commit

Permalink
Add uses annotation when duplicating to global scope (#12232)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Apr 12, 2024
1 parent 78eb8dd commit c036458
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OMEdit/OMEditLIB/Modeling/ModelicaClassDialog.cpp
Expand Up @@ -1161,7 +1161,8 @@ void DuplicateClassDialog::duplicateClass()
pLibraryTreeModel->checkIfAnyNonExistingClassLoaded();
pLibraryTreeModel->showModelWidget(pLibraryTreeItem);
// add uses annotation
GraphicsView::addUsesAnnotation(mpLibraryTreeItem->getNameStructure(), mpPathTextBox->text(), true);
const QString containingClassName = mpPathTextBox->text().isEmpty() ? mpNameTextBox->text() : mpPathTextBox->text();
GraphicsView::addUsesAnnotation(mpLibraryTreeItem->getNameStructure(), containingClassName, true);
accept();
} else {
QMessageBox::critical(MainWindow::instance(), QString("%1 - %2").arg(Helper::applicationName, Helper::error),
Expand Down

0 comments on commit c036458

Please sign in to comment.