File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,20 +128,24 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
128128 double a0, a;
129129 if ( mAdvancedDigitizingDockWidget ->constraintAngle ()->relative () && nPoints > 2 )
130130 {
131- a0 = std::atan2 ( -( prevPoint.y () - penulPoint.y () ), prevPoint.x () - penulPoint.x () ) + canvasRotationRad ;
131+ a0 = std::atan2 ( -( prevPoint.y () - penulPoint.y () ), prevPoint.x () - penulPoint.x () );
132132 }
133133 else
134134 {
135- a0 = canvasRotationRad ;
135+ a0 = 0 ;
136136 }
137137 if ( mAdvancedDigitizingDockWidget ->constraintAngle ()->isLocked () )
138138 {
139139 a = a0 - mAdvancedDigitizingDockWidget ->constraintAngle ()->value () * M_PI / 180 ;
140140 }
141141 else
142142 {
143- a = std::atan2 ( -( curPoint.y () - prevPoint.y () ), curPoint.x () - prevPoint.x () ) + canvasRotationRad ;
143+ a = std::atan2 ( -( curPoint.y () - prevPoint.y () ), curPoint.x () - prevPoint.x () );
144144 }
145+
146+ a0 += canvasRotationRad;
147+ a += canvasRotationRad;
148+
145149 painter->setPen ( mConstruction2Pen );
146150 painter->drawArc ( QRectF ( prevPointPix.x () - 20 ,
147151 prevPointPix.y () - 20 ,
You can’t perform that action at this time.
0 commit comments