Skip to content
Permalink
Browse files
Make "Snap to common angles" checkable to define its state
  • Loading branch information
uclaros authored and nyalldawson committed Apr 27, 2021
1 parent 9a42f23 commit 4241cc597cee6ef81f7bd7555c9fce74f032394f
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/gui/qgsadvanceddigitizingdockwidget.cpp
@@ -123,6 +123,9 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas *

qobject_cast< QToolButton *>( mToolbar->widgetForAction( mSettingsAction ) )->setPopupMode( QToolButton::InstantPopup );
mSettingsAction->setMenu( menu );
mSettingsAction->setCheckable( true );
mSettingsAction->setToolTip( tr( "Snap to common angles" ) );
mSettingsAction->setChecked( mCommonAngleConstraint != 0 );
connect( menu, &QMenu::triggered, this, &QgsAdvancedDigitizingDockWidget::settingsButtonTriggered );

// set tooltips
@@ -334,6 +337,7 @@ void QgsAdvancedDigitizingDockWidget::settingsButtonTriggered( QAction *action )
ica.key()->setChecked( true );
mCommonAngleConstraint = ica.value();
QgsSettings().setValue( QStringLiteral( "/Cad/CommonAngle" ), ica.value() );
mSettingsAction->setChecked( mCommonAngleConstraint != 0 );
return;
}
}

0 comments on commit 4241cc5

Please sign in to comment.