File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -247,18 +247,20 @@ ConnectionStyle ConnectionGraphicsObject::connectionStyle() const
247247 // -------------------------------------------
248248 // This is a BehaviorTree specific code, not applicable to upstream
249249
250- const auto & nodeStyle = StyleCollection::nodeStyle ();
250+ const auto & defaultStyle = StyleCollection::nodeStyle ();
251251
252252 auto inNodeStyle = _graphModel.nodeData (_connectionId.inNodeId , NodeRole::Style);
253253 QJsonDocument json = QJsonDocument::fromVariant (inNodeStyle);
254- NodeStyle currentStyle (json.object ());
254+ NodeStyle nodeStyle (json.object ());
255255
256- // if FilledConnectionPointColor was changed, use it as connection color
257- if (nodeStyle.FilledConnectionPointColor != currentStyle.FilledConnectionPointColor )
256+ // In real-time monitoring mode, the color of the connection should be the same
257+ // as the NormalBoundaryColor.
258+ // We recognize this case by the fact that nodeStyle and defaultStyle are different
259+ if (defaultStyle.NormalBoundaryColor != nodeStyle.NormalBoundaryColor )
258260 {
259261 auto connectionJson = connectionStyle.toJson ();
260262 auto connectionJsonObj = connectionJson[" ConnectionStyle" ].toObject ();
261- connectionJsonObj[" NormalColor" ] = nodeStyle.FilledConnectionPointColor .name ();
263+ connectionJsonObj[" NormalColor" ] = nodeStyle.NormalBoundaryColor .name ();
262264 connectionJson[" ConnectionStyle" ] = connectionJsonObj;
263265 connectionStyle.loadJson (connectionJson);
264266 }
You can’t perform that action at this time.
0 commit comments