Skip to content
Permalink
Browse files

Fix crash when cliking within embedded layer dialog, before a project

is selected

Fixes #19369
  • Loading branch information
nyalldawson committed Jul 10, 2018
1 parent a9c017d commit af98ff8ba1442aa46b3c6c144a7949ebafc4857f
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/app/qgsprojectlayergroupdialog.cpp
@@ -48,6 +48,9 @@ QgsProjectLayerGroupDialog::QgsProjectLayerGroupDialog( QWidget *parent, const Q
{
setupUi( this );

QgsEmbeddedLayerTreeModel *model = new QgsEmbeddedLayerTreeModel( mRootGroup, this );
mTreeView->setModel( model );

QgsSettings settings;

mProjectFileWidget->setStorageMode( QgsFileWidget::GetFile );
@@ -185,9 +188,6 @@ void QgsProjectLayerGroupDialog::changeProjectFile()
if ( !mShowEmbeddedContent )
removeEmbeddedNodes( mRootGroup );

QgsEmbeddedLayerTreeModel *model = new QgsEmbeddedLayerTreeModel( mRootGroup, this );
mTreeView->setModel( model );

connect( mTreeView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &QgsProjectLayerGroupDialog::onTreeViewSelectionChanged );

mProjectPath = mProjectFileWidget->filePath();

0 comments on commit af98ff8

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