@@ -218,7 +218,7 @@ QWidget *)
218
218
else
219
219
{
220
220
QRectF text_rect = recalculateTextSpace ();
221
- qDebug () << getStartItemPos () << getEndItemPos ();
221
+ // qDebug() << getStartItemPos() << getEndItemPos();
222
222
QLineF centerLine (getStartItemPos (), getEndItemPos ());
223
223
224
224
QPointF center_point = centerLine.pointAt (0.5 );
@@ -581,40 +581,24 @@ t=-------------------
581
581
QPoint intersect1 = QPoint (x1+(x2-x1)*t1,y1+(y2-y1)*t1);
582
582
qreal t2 = (-B - qSqrt (D))/(2 *A);
583
583
QPoint intersect2 = QPoint (x1+(x2-x1)*t2,y1+(y2-y1)*t2);
584
- qDebug () <<" p1: " << p1;
585
- qDebug () <<" p2: " << p2;
586
- qDebug () << " Intersect: " <<intersect1;
587
584
if ((t1 >=0 && t1 <= 1 ) || (t2 >= 0 && t2 <= 1 ) )
588
585
{
589
586
if ((t1 >=0 && t1 <= 1 ) && (t2 >= 0 && t2 <= 1 ))
590
587
return (t1 < t2) ? intersect1 : intersect2;
591
588
else if (t1 >=0 && t1 <= 1 )
592
589
{
593
- qDebug () <<" t1: " << t1;
594
- qDebug () <<" t2: " << t2;
595
- qDebug () << " Intersect: " <<intersect1;
596
590
return intersect1;
597
591
}
598
592
else
599
593
{
600
- qDebug () <<" t1: " << t1;
601
- qDebug () <<" t2: " << t2;
602
- qDebug () <<" Intersect: " << intersect2;
603
594
return intersect2;
604
595
}
605
596
606
597
}
607
598
else
608
599
{
609
600
qDebug () << " Fatal eroor: No intersect, returning point [0,0]" ;
610
- qDebug () << " Max qreal: " << std::numeric_limits<qreal>::max ();
611
- qDebug () << t1;
612
- qDebug () << t2;
613
- qDebug () << intersect1;
614
- qDebug () << intersect2;
615
- qDebug () << p1;
616
- qDebug () << p2;
617
- return p1;
601
+ return QPoint ();
618
602
}
619
603
620
604
}
0 commit comments