File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,11 @@ void QgsFieldCalculator::accept()
158
158
return ;
159
159
}
160
160
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 () )
162
166
{
163
167
mVectorLayer ->addExpressionField ( calcString, fieldDefinition () );
164
168
}
You can’t perform that action at this time.
0 commit comments