Skip to content

Commit 1568d7a

Browse files
committed
Fixed array connections.
1 parent c8c490f commit 1568d7a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

OMEdit/OMEditGUI/Annotations/LineAnnotation.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,11 @@ void ConnectionArray::saveArrayIndex()
864864
}
865865
}
866866
}
867-
mpGraphicsView->addConnectionToClass(mpConnectionLineAnnotation);
868-
mpConnectionLineAnnotation->setToolTip(QString("<b>connect</b>(%1, %2)").arg(startComponentName, endComponentName));
869-
mpConnectionLineAnnotation->drawCornerItems();
870-
mpConnectionLineAnnotation->setCornerItemsActiveOrPassive();
867+
mpConnectionLineAnnotation->setStartComponentName(startComponentName);
868+
mpConnectionLineAnnotation->setEndComponentName(endComponentName);
869+
mpGraphicsView->getModelWidget()->getUndoStack()->push(new AddConnectionCommand(mpConnectionLineAnnotation, true));
870+
mpGraphicsView->getModelWidget()->getLibraryTreeItem()->emitConnectionAdded(mpConnectionLineAnnotation);
871+
mpGraphicsView->getModelWidget()->updateModelicaText();
871872
accept();
872873
}
873874

0 commit comments

Comments
 (0)