Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit fdf0ab1

Browse files
committed
Handle the connection if FMU port contains dot
1 parent 7e08313 commit fdf0ab1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

OMEdit/OMEditGUI/Modeling/ModelWidgetContainer.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6142,11 +6142,12 @@ void ModelWidget::drawOMSModelConnections()
61426142
continue;
61436143
}
61446144
// get start connector component
6145-
Component *pStartConnectorComponent = getConnectorComponent(pStartComponent, startConnectionList.at(1));
6145+
QString startConnectorName = StringHandler::removeFirstWordAfterDot(QString(pConnections[i]->conA));
6146+
Component *pStartConnectorComponent = getConnectorComponent(pStartComponent, startConnectorName);
61466147
if (!pStartConnectorComponent) {
61476148
pMessagesWidget->addGUIMessage(MessageItem(MessageItem::Modelica, "", false, 0, 0, 0, 0,
61486149
GUIMessages::getMessage(GUIMessages::UNABLE_FIND_COMPONENT_IN_CONNECTION)
6149-
.arg(startConnectionList.at(1)).arg(pConnections[i]->conA),
6150+
.arg(startConnectorName).arg(pConnections[i]->conA),
61506151
Helper::scriptingKind, Helper::errorLevel));
61516152
continue;
61526153
}
@@ -6164,11 +6165,12 @@ void ModelWidget::drawOMSModelConnections()
61646165
continue;
61656166
}
61666167
// get end connector component
6167-
Component *pEndConnectorComponent = getConnectorComponent(pEndComponent, endConnectionList.at(1));
6168+
QString endConnectorName = StringHandler::removeFirstWordAfterDot(QString(pConnections[i]->conB));
6169+
Component *pEndConnectorComponent = getConnectorComponent(pEndComponent, endConnectorName);
61686170
if (!pEndConnectorComponent) {
61696171
pMessagesWidget->addGUIMessage(MessageItem(MessageItem::Modelica, "", false, 0, 0, 0, 0,
61706172
GUIMessages::getMessage(GUIMessages::UNABLE_FIND_COMPONENT_IN_CONNECTION)
6171-
.arg(endConnectionList.at(1)).arg(pConnections[i]->conB),
6173+
.arg(endConnectorName).arg(pConnections[i]->conB),
61726174
Helper::scriptingKind, Helper::errorLevel));
61736175
continue;
61746176
}

0 commit comments

Comments
 (0)