Skip to content

Commit c7b28db

Browse files
committedMar 30, 2015
Backport of pull request #1932
1 parent 002739b commit c7b28db

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎src/app/qgsfieldcalculator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ void QgsFieldCalculator::accept()
158158
return;
159159
}
160160

161-
if ( mNewFieldGroupBox->isChecked() && mCreateVirtualFieldCheckbox->isChecked() )
161+
// Test for creating expression field based on ! mUpdateExistingGroupBox checked rather
162+
// than on mNewFieldGroupBox checked, as if the provider does not support adding attributes
163+
// then mUpdateExistingGroupBox is set to not checkable, and hence is not checked. This
164+
// is a minimum fix to resolve this - better would be some GUI redesign...
165+
if ( ! mUpdateExistingGroupBox->isChecked() && mCreateVirtualFieldCheckbox->isChecked() )
162166
{
163167
mVectorLayer->addExpressionField( calcString, fieldDefinition() );
164168
}

0 commit comments

Comments
 (0)
Please sign in to comment.