Skip to content

Commit 9ad399d

Browse files
committed
resolved conflicts
1 parent 79e5240 commit 9ad399d

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

src/app/qgisapp.cpp

+21-17
Original file line numberDiff line numberDiff line change
@@ -7466,27 +7466,31 @@ void QgisApp::setupLayoutManagerConnections()
74667466

74677467
void QgisApp::setupDuplicateFeaturesAction()
74687468
{
7469-
mDuplicateFeatureAction.reset( new QgsMapLayerAction( tr( "Duplicate feature" ),
7470-
nullptr, QgsMapLayerAction::SingleFeature,
7471-
QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeature.svg" ) ), true ) );
7472-
7473-
QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureAction.get() );
7474-
connect( mDuplicateFeatureAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
7469+
QgsSettings settings;
7470+
if ( settings.value( QStringLiteral( "tools/showDuplicateFeatureActions" ), false, QgsSettings::App ).toBool() )
74757471
{
7476-
duplicateFeatures( layer, feat );
7477-
}
7478-
);
7472+
mDuplicateFeatureAction.reset( new QgsMapLayerAction( tr( "Duplicate feature" ),
7473+
nullptr, QgsMapLayerAction::SingleFeature,
7474+
QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeature.svg" ) ), true ) );
74797475

7480-
mDuplicateFeatureDigitizeAction.reset( new QgsMapLayerAction( tr( "Duplicate feature and digitize" ),
7481-
nullptr, QgsMapLayerAction::SingleFeature,
7482-
QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeatureDigitized.svg" ) ), true ) );
7476+
QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureAction.get() );
7477+
connect( mDuplicateFeatureAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
7478+
{
7479+
duplicateFeatures( layer, feat );
7480+
}
7481+
);
74837482

7484-
QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureDigitizeAction.get() );
7485-
connect( mDuplicateFeatureDigitizeAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
7486-
{
7487-
duplicateFeatureDigitized( layer, feat );
7483+
mDuplicateFeatureDigitizeAction.reset( new QgsMapLayerAction( tr( "Duplicate feature and digitize" ),
7484+
nullptr, QgsMapLayerAction::SingleFeature,
7485+
QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeatureDigitized.svg" ) ), true ) );
7486+
7487+
QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureDigitizeAction.get() );
7488+
connect( mDuplicateFeatureDigitizeAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
7489+
{
7490+
duplicateFeatureDigitized( layer, feat );
7491+
}
7492+
);
74887493
}
7489-
);
74907494
}
74917495

74927496
void QgisApp::setupAtlasMapLayerAction( QgsPrintLayout *layout, bool enableAction )

0 commit comments

Comments
 (0)