Skip to content
Permalink
Browse files

Fix #12257 - allow creation of expression field on delimited text layer

  • Loading branch information
ccrook committed Feb 26, 2015
1 parent a41094d commit 9c2f5725a448c7aa7a153f73bb244fe4a3fa0548
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 9c2f572

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