Skip to content

Commit

Permalink
fix(QgsAdvancedDigitizingTools): Add precision (decimals) to Circle X/Y
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nirvn committed Oct 25, 2024
1 parent 35929a0 commit 356c484
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/qgsadvanceddigitizingtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle1X->setToolTip( tr( "X coordinate" ) );
mCircle1X->setMinimum( std::numeric_limits<double>::lowest() );
mCircle1X->setMaximum( std::numeric_limits<double>::max() );
mCircle1X->setDecimals( mCadDockWidget->constraintX()->precision() );
mCircle1X->setClearValue( 0.0 );
connect( mCircle1X, &QgsDoubleSpinBox::textEdited, this, [ = ]() { mCircle1Digitize->setChecked( false ); } );
layout->addWidget( mCircle1X, 1, 1 );
Expand All @@ -84,6 +85,7 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle1Y->setToolTip( tr( "Y coordinate" ) );
mCircle1Y->setMinimum( std::numeric_limits<double>::lowest() );
mCircle1Y->setMaximum( std::numeric_limits<double>::max() );
mCircle1Y->setDecimals( mCadDockWidget->constraintY()->precision() );
mCircle1Y->setClearValue( 0.0 );
connect( mCircle1Y, &QgsDoubleSpinBox::textEdited, this, [ = ]() { mCircle1Digitize->setChecked( false ); } );
layout->addWidget( mCircle1Y, 2, 1 );
Expand Down Expand Up @@ -122,6 +124,7 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle2X->setToolTip( tr( "X coordinate" ) );
mCircle2X->setMinimum( std::numeric_limits<double>::lowest() );
mCircle2X->setMaximum( std::numeric_limits<double>::max() );
mCircle2X->setDecimals( mCadDockWidget->constraintX()->precision() );
mCircle2X->setClearValue( 0.0 );
connect( mCircle2X, &QgsDoubleSpinBox::textEdited, this, [ = ]() { mCircle2Digitize->setChecked( false ); } );
layout->addWidget( mCircle2X, 5, 1 );
Expand All @@ -133,6 +136,7 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle2Y->setToolTip( tr( "Y coordinate" ) );
mCircle2Y->setMinimum( std::numeric_limits<double>::lowest() );
mCircle2Y->setMaximum( std::numeric_limits<double>::max() );
mCircle2Y->setDecimals( mCadDockWidget->constraintY()->precision() );
mCircle2Y->setClearValue( 0.0 );
connect( mCircle2Y, &QgsDoubleSpinBox::textEdited, this, [ = ]() { mCircle2Digitize->setChecked( false ); } );
layout->addWidget( mCircle2Y, 6, 1 );
Expand Down

0 comments on commit 356c484

Please sign in to comment.