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 24, 2025
1 parent a8fb6d7 commit bca48a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
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() ) ) // skip-keyword-check
return;

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

QgsMapLayer *QgsProcessingMapLayerComboBox::currentLayer()
Expand Down

0 comments on commit bca48a7

Please sign in to comment.