Skip to content

Commit

Permalink
resolved conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
signedav committed Feb 23, 2018
1 parent 79e5240 commit 9ad399d
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/app/qgisapp.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -7466,27 +7466,31 @@ void QgisApp::setupLayoutManagerConnections()


void QgisApp::setupDuplicateFeaturesAction() void QgisApp::setupDuplicateFeaturesAction()
{ {
mDuplicateFeatureAction.reset( new QgsMapLayerAction( tr( "Duplicate feature" ), QgsSettings settings;
nullptr, QgsMapLayerAction::SingleFeature, if ( settings.value( QStringLiteral( "tools/showDuplicateFeatureActions" ), false, QgsSettings::App ).toBool() )
QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeature.svg" ) ), true ) );

QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureAction.get() );
connect( mDuplicateFeatureAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
{ {
duplicateFeatures( layer, feat ); mDuplicateFeatureAction.reset( new QgsMapLayerAction( tr( "Duplicate feature" ),
} nullptr, QgsMapLayerAction::SingleFeature,
); QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeature.svg" ) ), true ) );


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


QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureDigitizeAction.get() ); mDuplicateFeatureDigitizeAction.reset( new QgsMapLayerAction( tr( "Duplicate feature and digitize" ),
connect( mDuplicateFeatureDigitizeAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat ) nullptr, QgsMapLayerAction::SingleFeature,
{ QgsApplication::getThemeIcon( QStringLiteral( "/mActionDuplicateFeatureDigitized.svg" ) ), true ) );
duplicateFeatureDigitized( layer, feat );
QgsGui::mapLayerActionRegistry()->addMapLayerAction( mDuplicateFeatureDigitizeAction.get() );
connect( mDuplicateFeatureDigitizeAction.get(), &QgsMapLayerAction::triggeredForFeature, this, [this]( QgsMapLayer * layer, const QgsFeature & feat )
{
duplicateFeatureDigitized( layer, feat );
}
);
} }
);
} }


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

0 comments on commit 9ad399d

Please sign in to comment.