File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -128,20 +128,24 @@ void QgsAdvancedDigitizingCanvasItem::paint( QPainter *painter )
128
128
double a0, a;
129
129
if ( mAdvancedDigitizingDockWidget ->constraintAngle ()->relative () && nPoints > 2 )
130
130
{
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 () );
132
132
}
133
133
else
134
134
{
135
- a0 = canvasRotationRad ;
135
+ a0 = 0 ;
136
136
}
137
137
if ( mAdvancedDigitizingDockWidget ->constraintAngle ()->isLocked () )
138
138
{
139
139
a = a0 - mAdvancedDigitizingDockWidget ->constraintAngle ()->value () * M_PI / 180 ;
140
140
}
141
141
else
142
142
{
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 () );
144
144
}
145
+
146
+ a0 += canvasRotationRad;
147
+ a += canvasRotationRad;
148
+
145
149
painter->setPen ( mConstruction2Pen );
146
150
painter->drawArc ( QRectF ( prevPointPix.x () - 20 ,
147
151
prevPointPix.y () - 20 ,
You can’t perform that action at this time.
0 commit comments