Skip to content
Permalink
Browse files

Backport of pull request #1932

  • Loading branch information
ccrook committed Mar 30, 2015
1 parent 002739b commit c7b28dbd3b194c4a0db44b4f98d8b24d466b5a85
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/app/qgsfieldcalculator.cpp
@@ -158,7 +158,11 @@ void QgsFieldCalculator::accept()
return;
}

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

0 comments on commit c7b28db

Please sign in to comment.
You can’t perform that action at this time.