|
36 | 36 | #include <Eigen/Core> |
37 | 37 |
|
38 | 38 | #include <cassert> |
39 | | -#include <cfloat> |
40 | 39 | #include <cmath> |
41 | 40 | #include <memory> |
42 | 41 |
|
@@ -71,14 +70,12 @@ QConstraintBase::QConstraintBase() |
71 | 70 | } |
72 | 71 |
|
73 | 72 | QConstraintBase::QConstraintBase(const QConstraintBase &other) |
74 | | - : // QGraphicsItem(), |
75 | | - m_altColor(other.m_altColor) |
76 | | - , m_pen_req(other.m_pen_req) |
| 73 | + : m_pen_req(other.m_pen_req) |
77 | 74 | , m_pen_red(other.m_pen_red) |
78 | 75 | , m_is_required(other.m_is_required) |
79 | 76 | , m_is_enforced(other.m_is_enforced) |
| 77 | + , m_altColor(other.m_altColor) |
80 | 78 | { |
81 | | - // qDebug() << Q_FUNC_INFO << m_sc; |
82 | 79 | setVisible( s_show); |
83 | 80 |
|
84 | 81 | setFlag(ItemIsSelectable, true); |
@@ -215,7 +212,7 @@ void QAligned::paint( QPainter *painter, |
215 | 212 | } |
216 | 213 |
|
217 | 214 | if ( showColor() ) { |
218 | | - pen.setColor( m_altColor); |
| 215 | + pen.setColor( altColor() ); |
219 | 216 | } |
220 | 217 |
|
221 | 218 | painter->setPen( pen ); |
@@ -306,7 +303,7 @@ void QOrthogonal::paint( QPainter *painter, |
306 | 303 | } |
307 | 304 |
|
308 | 305 | if ( showColor() ) { |
309 | | - pen.setColor( m_altColor); |
| 306 | + pen.setColor( altColor() ); |
310 | 307 | } |
311 | 308 |
|
312 | 309 | painter->setPen( pen ); |
@@ -422,7 +419,7 @@ void QCopunctual::paint( QPainter *painter, |
422 | 419 | QPen pen = QPen( required() ? m_pen_req : m_pen_red); |
423 | 420 |
|
424 | 421 | if ( showColor()) { |
425 | | - pen.setColor( m_altColor); |
| 422 | + pen.setColor( altColor() ); |
426 | 423 | } |
427 | 424 | if ( !enforced() ) { |
428 | 425 | pen.setColor(Qt::red); |
@@ -541,7 +538,7 @@ void QParallel::paint( QPainter *painter, |
541 | 538 | QPen pen = QPen( required() ? m_pen_req : m_pen_red); |
542 | 539 |
|
543 | 540 | if ( showColor() ) { |
544 | | - pen.setColor( m_altColor); |
| 541 | + pen.setColor( altColor() ); |
545 | 542 | } |
546 | 543 |
|
547 | 544 | if ( !enforced() ) { |
|
0 commit comments