Skip to content

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 12, 2021
1 parent 22613a4 commit 3e9e689
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
10 changes: 4 additions & 6 deletions src/app/qgsmaptoolrotatefeature.cpp
Expand Up @@ -109,7 +109,6 @@ int QgsAngleMagnetWidget::magnet() const
return mMagnetSpinBox->value();
}


bool QgsAngleMagnetWidget::eventFilter( QObject *obj, QEvent *ev )
{
if ( obj == mAngleSpinBox && ev->type() == QEvent::KeyPress )
Expand All @@ -135,11 +134,12 @@ void QgsAngleMagnetWidget::angleSpinBoxValueChanged( double angle )
emit angleChanged( angle );
}

//
// QgsMapToolRotateFeature
//

QgsMapToolRotateFeature::QgsMapToolRotateFeature( QgsMapCanvas *canvas )
: QgsMapToolEdit( canvas )
, mRotation( 0 )
, mRotationOffset( 0 )
, mRotationActive( false )
{
}

Expand Down Expand Up @@ -174,7 +174,6 @@ void QgsMapToolRotateFeature::canvasMoveEvent( QgsMapMouseEvent *e )
}
}


void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )
{
if ( !mCanvas )
Expand Down Expand Up @@ -362,7 +361,6 @@ void QgsMapToolRotateFeature::updateRubberband( double rotation )
}
}


void QgsMapToolRotateFeature::applyRotation( double rotation )
{
mRotation = rotation;
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptoolrotatefeature.h
Expand Up @@ -107,13 +107,13 @@ class APP_EXPORT QgsMapToolRotateFeature: public QgsMapToolEdit

//! Id of moved feature
QgsFeatureIds mRotatedFeatures;
double mRotation;
double mRotationOffset;
double mRotation = 0;
double mRotationOffset = 0;

QPoint mStPoint;
std::unique_ptr<QgsVertexMarker> mAnchorPoint = nullptr;

bool mRotationActive;
bool mRotationActive = false;

//! Shows current angle value and allows numerical editing
QgsAngleMagnetWidget *mRotationWidget = nullptr;
Expand Down

0 comments on commit 3e9e689

Please sign in to comment.