Skip to content

Commit

Permalink
[gui][processing] Fix inconsistent behavior with the map layer widget…
Browse files Browse the repository at this point in the history
…'s selected features only checkbox
  • Loading branch information
nirvn committed Jan 21, 2025
1 parent c98dcb2 commit fc958b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/qgsmaplayermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ QgsMapLayerModel::QgsMapLayerModel( QObject *parent, QgsProject *project )

void QgsMapLayerModel::setProject( QgsProject *project )
{
if ( mProject == project ? project : QgsProject::instance() )
return;

// remove layers from previous project
if ( mProject )
Expand Down
5 changes: 4 additions & 1 deletion src/gui/processing/qgsprocessingmaplayercombobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ QgsProcessingMapLayerComboBox::~QgsProcessingMapLayerComboBox() = default;
void QgsProcessingMapLayerComboBox::setLayer( QgsMapLayer *layer )
{
if ( layer || mParameter->flags() & Qgis::ProcessingParameterFlag::Optional )
mCombo->setLayer( layer );
{
whileBlocking( mCombo )->setLayer( layer );
onLayerChanged( layer );
}
}

QgsMapLayer *QgsProcessingMapLayerComboBox::currentLayer()
Expand Down

0 comments on commit fc958b5

Please sign in to comment.