99
1010#include < QtGui/QIcon>
1111
12-
1312namespace QtNodes {
1413
1514QPainterPath DefaultConnectionPainter::cubicPath (ConnectionGraphicsObject const &connection) const
@@ -27,11 +26,12 @@ QPainterPath DefaultConnectionPainter::cubicPath(ConnectionGraphicsObject const
2726 return cubic;
2827}
2928
30- void DefaultConnectionPainter::drawSketchLine (QPainter *painter, ConnectionGraphicsObject const &cgo) const
29+ void DefaultConnectionPainter::drawSketchLine (QPainter *painter,
30+ ConnectionGraphicsObject const &cgo) const
3131{
3232 ConnectionState const &state = cgo.connectionState ();
3333
34- if (state.requiresPort ()) {
34+ if (state.requiresPort () || state. frozen () ) {
3535 auto const &connectionStyle = QtNodes::StyleCollection::connectionStyle ();
3636
3737 QPen pen;
@@ -49,7 +49,8 @@ void DefaultConnectionPainter::drawSketchLine(QPainter *painter, ConnectionGraph
4949 }
5050}
5151
52- void DefaultConnectionPainter::drawHoveredOrSelected (QPainter *painter, ConnectionGraphicsObject const &cgo) const
52+ void DefaultConnectionPainter::drawHoveredOrSelected (QPainter *painter,
53+ ConnectionGraphicsObject const &cgo) const
5354{
5455 bool const hovered = cgo.connectionState ().hovered ();
5556 bool const selected = cgo.isSelected ();
@@ -74,11 +75,12 @@ void DefaultConnectionPainter::drawHoveredOrSelected(QPainter *painter, Connecti
7475 }
7576}
7677
77- void DefaultConnectionPainter::drawNormalLine (QPainter *painter, ConnectionGraphicsObject const &cgo) const
78+ void DefaultConnectionPainter::drawNormalLine (QPainter *painter,
79+ ConnectionGraphicsObject const &cgo) const
7880{
7981 ConnectionState const &state = cgo.connectionState ();
8082
81- if (state.requiresPort ())
83+ if (state.requiresPort () || state. frozen () )
8284 return ;
8385
8486 // colors
@@ -132,6 +134,7 @@ void DefaultConnectionPainter::drawNormalLine(QPainter *painter, ConnectionGraph
132134 painter->setBrush (Qt::NoBrush);
133135
134136 QColor cOut = normalColorOut;
137+
135138 if (selected)
136139 cOut = cOut.darker (200 );
137140 p.setColor (cOut);
@@ -200,7 +203,8 @@ void DefaultConnectionPainter::paint(QPainter *painter, ConnectionGraphicsObject
200203 painter->drawEllipse (cgo.in (), pointRadius, pointRadius);
201204}
202205
203- QPainterPath DefaultConnectionPainter::getPainterStroke (ConnectionGraphicsObject const &connection) const
206+ QPainterPath DefaultConnectionPainter::getPainterStroke (
207+ ConnectionGraphicsObject const &connection) const
204208{
205209 auto cubic = cubicPath (connection);
206210
0 commit comments