@@ -47,8 +47,8 @@ QString QgsJoinByAttributeAlgorithm::groupId() const
47
47
void QgsJoinByAttributeAlgorithm::initAlgorithm ( const QVariantMap & )
48
48
{
49
49
QStringList methods;
50
- methods << QObject::tr ( " Take attributes of the first matching feature only (one-to-one )" )
51
- << QObject::tr ( " Create separate feature for each matching feature (one-to-many )" );
50
+ methods << QObject::tr ( " Create separate feature for each matching feature (one-to-many )" )
51
+ << QObject::tr ( " Take attributes of the first matching feature only (one-to-one )" );
52
52
53
53
addParameter ( new QgsProcessingParameterFeatureSource ( QStringLiteral ( " INPUT" ),
54
54
QObject::tr ( " Input layer" ), QList< int >() << QgsProcessing::TypeVector ) );
@@ -67,7 +67,7 @@ void QgsJoinByAttributeAlgorithm::initAlgorithm( const QVariantMap & )
67
67
68
68
addParameter ( new QgsProcessingParameterEnum ( QStringLiteral ( " METHOD" ),
69
69
QObject::tr ( " Join type" ),
70
- methods, false , 0 ) );
70
+ methods, false , 1 ) );
71
71
addParameter ( new QgsProcessingParameterBoolean ( QStringLiteral ( " DISCARD_NONMATCHING" ),
72
72
QObject::tr ( " Discard records which could not be joined" ),
73
73
false ) );
@@ -158,7 +158,7 @@ QVariantMap QgsJoinByAttributeAlgorithm::processAlgorithm( const QVariantMap &pa
158
158
159
159
feedback->setProgress ( i * step );
160
160
161
- if ( joinMethod == 0 && input2AttributeCache.contains ( feat.attribute ( joinField2Index ) ) )
161
+ if ( joinMethod == 1 && input2AttributeCache.contains ( feat.attribute ( joinField2Index ) ) )
162
162
continue ;
163
163
164
164
// only keep selected attributes
0 commit comments