We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f91ef36 commit acacec9Copy full SHA for acacec9
OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp
@@ -5542,7 +5542,7 @@ bool ModelWidget::isNewApi()
5542
QString ModelWidget::getModelTextForOMCUndoCommand()
5543
{
5544
QString oldModelText = mpEditor->getPlainTextEdit()->toPlainText();
5545
- if (!mpLibraryTreeItem->isTopLevel()) {
+ if (!oldModelText.trimmed().startsWith("within") && !mpLibraryTreeItem->isTopLevel()) {
5546
oldModelText = "within " % mpLibraryTreeItem->parent()->getNameStructure() % ";\n" % oldModelText;
5547
}
5548
return oldModelText;
0 commit comments