Skip to content

Commit

Permalink
Avoid recursion in feature filter model
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 30, 2017
1 parent 1d21072 commit a3eadd3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/qgsfeaturefiltermodel.cpp
Expand Up @@ -379,8 +379,8 @@ void QgsFeatureFilterModel::setExtraIdentifierValueUnguarded( const QVariant &ex
mEntries.prepend( Entry( QVariant( QVariant::Int ), QStringLiteral( "%1" ).arg( tr( "NULL" ) ) ) );
else
mEntries.prepend( Entry( extraIdentifierValue, QStringLiteral( "(%1)" ).arg( extraIdentifierValue.toString() ) ) );
endInsertRows();
setExtraIdentifierValueIndex( 0 );
endInsertRows();

reloadCurrentFeature();
}
Expand Down Expand Up @@ -447,11 +447,11 @@ QVariant QgsFeatureFilterModel::extraIdentifierValue() const

void QgsFeatureFilterModel::setExtraIdentifierValue( const QVariant &extraIdentifierValue )
{
if ( extraIdentifierValue == mExtraIdentifierValue && extraIdentifierValue.isNull() == mExtraIdentifierValue.isNull() && mExtraIdentifierValue.isValid() )
if ( extraIdentifierValue == mExtraIdentifierValue && extraIdentifierValue.isNull() == mExtraIdentifierValue.isNull() && mExtraIdentifierValue.isValid() == extraIdentifierValue.isValid() )
return;

mExtraIdentifierValue = extraIdentifierValue;
setExtraIdentifierValueUnguarded( extraIdentifierValue );

mExtraIdentifierValue = extraIdentifierValue;
emit extraIdentifierValueChanged();
}

0 comments on commit a3eadd3

Please sign in to comment.