mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-24 00:06:24 -04:00
Visual indent part 2
This commit is contained in:
parent
e335e481fd
commit
dec09cf5bd
@ -24,7 +24,6 @@ QgsMapToolCircle2Points::QgsMapToolCircle2Points( QgsMapToolCapture *parentTool,
|
||||
QgsMapCanvas *canvas, CaptureMode mode )
|
||||
: QgsMapToolAddCircle( parentTool, canvas, mode )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QgsMapToolCircle2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
|
||||
|
@ -70,10 +70,9 @@ void QgsMapToolCircle2TangentsPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e
|
||||
QgsMessageBar::CRITICAL, QgisApp::instance()->messageTimeout() );
|
||||
deactivate();
|
||||
}
|
||||
|
||||
createRadiusSpinBox();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else if ( e->button() == Qt::RightButton )
|
||||
{
|
||||
@ -222,8 +221,6 @@ void QgsMapToolCircle2TangentsPoint::getPossibleCenter( )
|
||||
mCenters.append( p4 );
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void QgsMapToolCircle2TangentsPoint::createRadiusSpinBox()
|
||||
@ -270,6 +267,5 @@ void QgsMapToolCircle2TangentsPoint::radiusSpinBoxChanged( int radius )
|
||||
tempRB->show();
|
||||
mRubberBands.append( tempRB.release() );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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 );
|
||||
@ -50,7 +51,6 @@ class QgsMapToolCircle2TangentsPoint: public QgsMapToolAddCircle
|
||||
|
||||
QSpinBox *mRadiusSpinBox = nullptr;
|
||||
|
||||
|
||||
int mRadius = 0;
|
||||
QVector<QgsPointXY> mCenters;
|
||||
QVector<QgsGeometryRubberBand *> mRubberBands;
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
@ -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 ) );
|
||||
|
@ -28,7 +28,6 @@ class QgsMapToolCircle3Tangents: public QgsMapToolAddCircle
|
||||
QgsMapToolCircle3Tangents( QgsMapToolCapture *parentTool, QgsMapCanvas *canvas, CaptureMode mode = CaptureLine );
|
||||
|
||||
void cadCanvasReleaseEvent( QgsMapMouseEvent *e ) override;
|
||||
|
||||
};
|
||||
|
||||
#endif // QGSMAPTOOLCIRCLE3TANGENTS_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user