Skip to content
Permalink
Browse files

Fixed a crash in QgsMapLayerModel (when opening a new project)

  • Loading branch information
wonder-sk committed Apr 17, 2014
1 parent f73b3fe commit 54ce9a0ec38a210c384b0e455045ec6aeaad1d7d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/gui/qgsmaplayermodel.cpp
@@ -28,7 +28,7 @@ QgsMapLayerModel::QgsMapLayerModel( QList<QgsMapLayer *> layers, QObject *parent
, mLayersChecked( QMap<QString, Qt::CheckState>() )
, mItemCheckable( false )
{
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersRemoved( QStringList ) ), this, SLOT( removeLayers( QStringList ) ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ), this, SLOT( removeLayers( QStringList ) ) );
addLayers( layers );
}

@@ -38,7 +38,7 @@ QgsMapLayerModel::QgsMapLayerModel( QObject *parent )
, mItemCheckable( false )
{
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersAdded( QList<QgsMapLayer*> ) ), this, SLOT( addLayers( QList<QgsMapLayer*> ) ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersRemoved( QStringList ) ), this, SLOT( removeLayers( QStringList ) ) );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ), this, SLOT( removeLayers( QStringList ) ) );
addLayers( QgsMapLayerRegistry::instance()->mapLayers().values() );
}

0 comments on commit 54ce9a0

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