Skip to content

Commit

Permalink
[cad] Make 2-circle intersection tool's digitizing buttons mutually e…
Browse files Browse the repository at this point in the history
…xclusive
  • Loading branch information
nirvn committed Jul 31, 2024
1 parent 53040f0 commit ca2aded
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/gui/qgsadvanceddigitizingtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle1Digitize->setCheckable( true );
mCircle1Digitize->setChecked( false );
mCircle1Digitize->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionMapIdentification.svg" ) ) );
connect( mCircle1Digitize, &QAbstractButton::toggled, this, [ = ]( bool checked )
{
if ( checked )
{
mCircle2Digitize->setChecked( false );
}
} );
layout->addWidget( mCircle1Digitize, 1, 2, 2, 1 );

label = new QLabel( QStringLiteral( "X" ), toolWidget );
Expand Down Expand Up @@ -85,6 +92,13 @@ QWidget *QgsAdvancedDigitizingCirclesIntersectionTool::createWidget()
mCircle2Digitize->setCheckable( true );
mCircle2Digitize->setChecked( false );
mCircle2Digitize->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionMapIdentification.svg" ) ) );
connect( mCircle2Digitize, &QAbstractButton::toggled, this, [ = ]( bool checked )
{
if ( checked )
{
mCircle1Digitize->setChecked( false );
}
} );
layout->addWidget( mCircle2Digitize, 5, 2, 2, 1 );

label = new QLabel( QStringLiteral( "X" ), toolWidget );
Expand Down

0 comments on commit ca2aded

Please sign in to comment.