Skip to content
Permalink
Browse files

[processing] Fix 'selected features only' is disabled by default

Fixes #36753
  • Loading branch information
nyalldawson committed May 27, 2020
1 parent 11f6d53 commit 0ea7187ae4b92fe807f48c5e8ef8d617d9f79de1
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/gui/processing/qgsprocessingmaplayercombobox.cpp
@@ -298,11 +298,6 @@ void QgsProcessingMapLayerComboBox::setValue( const QVariant &value, QgsProcessi
if ( !found )
{
const QString string = val.toString();
if ( mUseSelectionCheckBox )
{
mUseSelectionCheckBox->setChecked( false );
mUseSelectionCheckBox->setEnabled( false );
}
if ( mIterateButton )
mIterateButton->setChecked( iterate );

@@ -316,13 +311,23 @@ void QgsProcessingMapLayerComboBox::setValue( const QVariant &value, QgsProcessi
mCombo->setAdditionalItems( additional );
}
mCombo->setCurrentIndex( mCombo->findText( string ) ); // this may or may not throw a signal, so let's block it..
if ( mUseSelectionCheckBox )
{
mUseSelectionCheckBox->setChecked( false );
mUseSelectionCheckBox->setEnabled( false );
}
mBlockChangedSignal--;
if ( !mBlockChangedSignal )
emit valueChanged(); // and ensure we only ever raise one
}
else if ( mParameter->flags() & QgsProcessingParameterDefinition::FlagOptional )
{
mCombo->setLayer( nullptr );
if ( mUseSelectionCheckBox )
{
mUseSelectionCheckBox->setChecked( false );
mUseSelectionCheckBox->setEnabled( false );
}
}
}
}

0 comments on commit 0ea7187

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