Skip to content

Commit

Permalink
Visual indent part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Oct 3, 2017
1 parent e335e48 commit dec09cf
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/app/qgsmaptoolcircle2points.cpp
Expand Up @@ -24,7 +24,6 @@ QgsMapToolCircle2Points::QgsMapToolCircle2Points( QgsMapToolCapture *parentTool,
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{

}

void QgsMapToolCircle2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
Expand Down
6 changes: 1 addition & 5 deletions src/app/qgsmaptoolcircle2tangentspoint.cpp
Expand Up @@ -70,10 +70,9 @@ void QgsMapToolCircle2TangentsPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e
QgsMessageBar::CRITICAL, QgisApp::instance()->messageTimeout() );
deactivate();
}
createRadiusSpinBox();

createRadiusSpinBox();
}

}
else if ( e->button() == Qt::RightButton )
{
Expand Down Expand Up @@ -222,8 +221,6 @@ void QgsMapToolCircle2TangentsPoint::getPossibleCenter( )
mCenters.append( p4 );

}


}

void QgsMapToolCircle2TangentsPoint::createRadiusSpinBox()
Expand Down Expand Up @@ -270,6 +267,5 @@ void QgsMapToolCircle2TangentsPoint::radiusSpinBoxChanged( int radius )
tempRB->show();
mRubberBands.append( tempRB.release() );
}

}
}
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolcircle2tangentspoint.h
Expand Up @@ -36,6 +36,7 @@ class QgsMapToolCircle2TangentsPoint: public QgsMapToolAddCircle

public slots:
void radiusSpinBoxChanged( int radius );

private:
//! Return the point where segments are intersected. Method from QgsGeometryUtils doesn't work for special cases used by this tool.
QgsPointXY intersect( QgsPointXY seg1_pt1, QgsPointXY seg1_pt2, QgsPointXY seg2_pt1, QgsPointXY seg2_pt2 );
Expand All @@ -50,7 +51,6 @@ class QgsMapToolCircle2TangentsPoint: public QgsMapToolAddCircle

QSpinBox *mRadiusSpinBox = nullptr;


int mRadius = 0;
QVector<QgsPointXY> mCenters;
QVector<QgsGeometryRubberBand *> mRubberBands;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoolcircle3points.cpp
Expand Up @@ -35,7 +35,6 @@ void QgsMapToolCircle3Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
if ( mPoints.size() < 2 )
mPoints.append( mapPoint );

if ( !mPoints.isEmpty() && !mTempRubberBand )
{
mTempRubberBand = createGeometryRubberBand( ( mode() == CapturePolygon ) ? QgsWkbTypes::PolygonGeometry : QgsWkbTypes::LineGeometry, true );
Expand Down
2 changes: 0 additions & 2 deletions src/app/qgsmaptoolcircle3tangents.cpp
Expand Up @@ -32,7 +32,6 @@ QgsMapToolCircle3Tangents::QgsMapToolCircle3Tangents( QgsMapToolCapture *parentT

void QgsMapToolCircle3Tangents::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{

QgsPoint mapPoint( e->mapPoint() );
EdgesOnlyFilter filter;
QgsPointLocator::Match match = mCanvas->snappingUtils()->snapToMap( mapPoint, &filter );
Expand Down Expand Up @@ -66,7 +65,6 @@ void QgsMapToolCircle3Tangents::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
if ( match.isValid() && ( mPoints.size() == 4 ) )
{

match.edgePoints( p1, p2 );
mPoints.append( QgsPoint( p1 ) );
mPoints.append( QgsPoint( p2 ) );
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoolcircle3tangents.h
Expand Up @@ -28,7 +28,6 @@ class QgsMapToolCircle3Tangents: public QgsMapToolAddCircle
QgsMapToolCircle3Tangents( QgsMapToolCapture *parentTool, QgsMapCanvas *canvas, CaptureMode mode = CaptureLine );

void cadCanvasReleaseEvent( QgsMapMouseEvent *e ) override;

};

#endif // QGSMAPTOOLCIRCLE3TANGENTS_H

0 comments on commit dec09cf

Please sign in to comment.