Skip to content
Permalink
Browse files

Minor cleanups

  • Loading branch information
nyalldawson committed Jan 12, 2021
1 parent 22613a4 commit 3e9e689ff7cf8d35f6da2120497046d6e18ee214
Showing with 7 additions and 9 deletions.
  1. +4 −6 src/app/qgsmaptoolrotatefeature.cpp
  2. +3 −3 src/app/qgsmaptoolrotatefeature.h
@@ -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 )
@@ -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 )
{
}

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


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


void QgsMapToolRotateFeature::applyRotation( double rotation )
{
mRotation = rotation;
@@ -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;

0 comments on commit 3e9e689

Please sign in to comment.
You can’t perform that action at this time.