Skip to content

Commit 0ea7187

Browse files
committedMay 27, 2020
[processing] Fix 'selected features only' is disabled by default
Fixes #36753
1 parent 11f6d53 commit 0ea7187

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed
 

‎src/gui/processing/qgsprocessingmaplayercombobox.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,6 @@ void QgsProcessingMapLayerComboBox::setValue( const QVariant &value, QgsProcessi
298298
if ( !found )
299299
{
300300
const QString string = val.toString();
301-
if ( mUseSelectionCheckBox )
302-
{
303-
mUseSelectionCheckBox->setChecked( false );
304-
mUseSelectionCheckBox->setEnabled( false );
305-
}
306301
if ( mIterateButton )
307302
mIterateButton->setChecked( iterate );
308303

@@ -316,13 +311,23 @@ void QgsProcessingMapLayerComboBox::setValue( const QVariant &value, QgsProcessi
316311
mCombo->setAdditionalItems( additional );
317312
}
318313
mCombo->setCurrentIndex( mCombo->findText( string ) ); // this may or may not throw a signal, so let's block it..
314+
if ( mUseSelectionCheckBox )
315+
{
316+
mUseSelectionCheckBox->setChecked( false );
317+
mUseSelectionCheckBox->setEnabled( false );
318+
}
319319
mBlockChangedSignal--;
320320
if ( !mBlockChangedSignal )
321321
emit valueChanged(); // and ensure we only ever raise one
322322
}
323323
else if ( mParameter->flags() & QgsProcessingParameterDefinition::FlagOptional )
324324
{
325325
mCombo->setLayer( nullptr );
326+
if ( mUseSelectionCheckBox )
327+
{
328+
mUseSelectionCheckBox->setChecked( false );
329+
mUseSelectionCheckBox->setEnabled( false );
330+
}
326331
}
327332
}
328333
}

0 commit comments

Comments
 (0)
Please sign in to comment.