Skip to content

Commit

Permalink
Only enable update selection in field calc when we have a selection
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 6, 2014
1 parent 753eb28 commit 2d55c6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/qgsfieldcalculator.cpp
Expand Up @@ -85,7 +85,9 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl )
mNewFieldGroupBox->setCheckable( false );
}

mOnlyUpdateSelectedCheckBox->setChecked( vl->selectedFeaturesIds().size() > 0 );
bool hasselection = vl->selectedFeaturesIds().size() > 0;
mOnlyUpdateSelectedCheckBox->setChecked( hasselection );
mOnlyUpdateSelectedCheckBox->setEnabled( hasselection );
}

QgsFieldCalculator::~QgsFieldCalculator()
Expand Down

0 comments on commit 2d55c6d

Please sign in to comment.