Skip to content

Commit f9c48bf

Browse files
committedMay 30, 2017
Allow transform effect rotation from -360 to 360
1 parent 3cd99c3 commit f9c48bf

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed
 

‎python/core/effects/qgstransformeffect.sip

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,14 @@ class QgsTransformEffect : QgsPaintEffect
157157

158158
void setRotation( const double rotation );
159159
%Docstring
160-
Sets the transform rotation.
161-
\param rotation degrees to rotate, clockwise
162-
.. seealso:: rotation
160+
Sets the transform ``rotation``, in degrees clockwise.
161+
.. seealso:: rotation()
163162
%End
164163

165164
double rotation() const;
166165
%Docstring
167-
Returns the transform rotation.
168-
:return: rotation in degrees clockwise
169-
.. seealso:: setRotation
166+
Returns the transform rotation, in degrees clockwise.
167+
.. seealso:: setRotation()
170168
:rtype: float
171169
%End
172170

‎src/core/effects/qgstransformeffect.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ class CORE_EXPORT QgsTransformEffect : public QgsPaintEffect
149149
*/
150150
double scaleY() const { return mScaleY; }
151151

152-
/** Sets the transform rotation.
153-
* \param rotation degrees to rotate, clockwise
154-
* \see rotation
152+
/**
153+
* Sets the transform \a rotation, in degrees clockwise.
154+
* \see rotation()
155155
*/
156156
void setRotation( const double rotation ) { mRotation = rotation; }
157157

158-
/** Returns the transform rotation.
159-
* \returns rotation in degrees clockwise
160-
* \see setRotation
158+
/**
159+
* Returns the transform rotation, in degrees clockwise.
160+
* \see setRotation()
161161
*/
162162
double rotation() const { return mRotation; }
163163

‎src/gui/effects/qgspainteffectwidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ QgsTransformWidget::QgsTransformWidget( QWidget *parent )
577577
<< QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches );
578578
mSpinTranslateX->setClearValue( 0 );
579579
mSpinTranslateY->setClearValue( 0 );
580+
mRotationSpinBox->setClearValue( 0 );
580581
mSpinShearX->setClearValue( 0 );
581582
mSpinShearY->setClearValue( 0 );
582583
mSpinScaleX->setClearValue( 100.0 );

‎src/ui/effects/widget_transform.ui

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@
117117
<property name="suffix">
118118
<string> °</string>
119119
</property>
120+
<property name="minimum">
121+
<double>-360.000000000000000</double>
122+
</property>
120123
<property name="maximum">
121124
<double>360.000000000000000</double>
122125
</property>

0 commit comments

Comments
 (0)
Please sign in to comment.