Skip to content

Commit 6af9261

Browse files
committedMay 22, 2013
Allow unprepared execution of QgsExpression
1 parent b7f1987 commit 6af9261

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/core/qgsexpression.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -2243,7 +2243,10 @@ QVariant QgsExpression::NodeColumnRef::eval( QgsExpression* /*parent*/, QgsFeatu
22432243
{
22442244
if ( f )
22452245
{
2246-
return f->attribute( mIndex );
2246+
if ( mIndex >= 0 )
2247+
return f->attribute( mIndex );
2248+
else
2249+
return f->attribute( mName );
22472250
}
22482251
return QVariant( "[" + mName + "]" );
22492252
}

0 commit comments

Comments
 (0)
Please sign in to comment.