Skip to content
Permalink
Browse files

fix #38872

  • Loading branch information
vcloarec authored and nyalldawson committed Sep 21, 2020
1 parent ca6ffb7 commit 0fb54bc4ac657eff7332da2f9c6d4889b46d1032
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/app/qgisapp.cpp
@@ -10087,17 +10087,18 @@ void QgisApp::enableDigitizeWithCurveAction( bool enable )
QgsSettings settings;

QObject *sender = QObject::sender();
if ( sender && sender != this )
enable &= ( sender == mActionAddFeature && mMapTools.mAddFeature->mode() != QgsMapToolCapture::CapturePoint ) ||
sender == mActionSplitFeatures;
else
enable &= ( mMapCanvas->mapTool() == mMapTools.mAddFeature && mMapTools.mAddFeature->mode() != QgsMapToolCapture::CapturePoint ) ||
mMapCanvas->mapTool() == mMapTools.mSplitFeatures;

enable &= ( sender == mActionAddFeature && mMapTools.mAddFeature->mode() != QgsMapToolCapture::CapturePoint ) ||
( mMapCanvas->mapTool() == mMapTools.mAddFeature && mMapTools.mAddFeature->mode() != QgsMapToolCapture::CapturePoint ) ||
sender == mActionSplitFeatures ||
mMapCanvas->mapTool() == mMapTools.mSplitFeatures;

bool isChecked = settings.value( QStringLiteral( "UI/digitizeWithCurve" ) ).toInt() && enable;
mActionDigitizeWithCurve->setChecked( isChecked );

mActionDigitizeWithCurve->setEnabled( enable );

mMapTools.mAddFeature->setCircularDigitizingEnabled( isChecked );
static_cast<QgsMapToolCapture *>( mMapTools.mSplitFeatures )->setCircularDigitizingEnabled( isChecked );
}

void QgisApp::splitFeatures()

0 comments on commit 0fb54bc

Please sign in to comment.
You can’t perform that action at this time.