Skip to content

Commit

Permalink
Consider the inherited connections when detecting collision (#11340)
Browse files Browse the repository at this point in the history
  • Loading branch information
adeas31 committed Oct 8, 2023
1 parent 9c03109 commit 7fdfe5c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OMEdit/OMEditLIB/Modeling/ModelWidgetContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,13 @@ void GraphicsView::drawInitialStates(ModelInstance::Model *pModelInstance, bool
void GraphicsView::handleCollidingConnections()
{
// First clear the colliding connector elements and connections.
foreach (LineAnnotation *pConnectionLineAnnotation, mConnectionsList) {
QList<LineAnnotation*> connections = mInheritedConnectionsList;
connections.append(mConnectionsList);
foreach (LineAnnotation *pConnectionLineAnnotation, connections) {
pConnectionLineAnnotation->clearCollidingConnections();
}

foreach (LineAnnotation *pConnectionLineAnnotation, mConnectionsList) {
foreach (LineAnnotation *pConnectionLineAnnotation, connections) {
pConnectionLineAnnotation->handleCollidingConnections();
}
}
Expand Down

0 comments on commit 7fdfe5c

Please sign in to comment.