Skip to content

Commit

Permalink
follow up db21851 : use proper class name when connecting to editing …
Browse files Browse the repository at this point in the history
…signals
  • Loading branch information
nirvn authored and nyalldawson committed Aug 2, 2021
1 parent 0283cb6 commit 9be0d9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -14435,9 +14435,9 @@ void QgisApp::layersWereAdded( const QList<QgsMapLayer *> &layers )
const auto constLayers = layers;
for ( QgsMapLayer *layer : constLayers )
{
connect( layer, &QgsMeshLayer::layerModified, this, &QgisApp::updateLayerModifiedActions );
connect( layer, &QgsMeshLayer::editingStarted, this, &QgisApp::layerEditStateChanged );
connect( layer, &QgsMeshLayer::editingStopped, this, &QgisApp::layerEditStateChanged );
connect( layer, &QgsMapLayer::layerModified, this, &QgisApp::updateLayerModifiedActions );
connect( layer, &QgsMapLayer::editingStarted, this, &QgisApp::layerEditStateChanged );
connect( layer, &QgsMapLayer::editingStopped, this, &QgisApp::layerEditStateChanged );

if ( QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer ) )
{
Expand Down
6 changes: 3 additions & 3 deletions src/core/layertree/qgslayertreemodel.cpp
Expand Up @@ -941,9 +941,9 @@ void QgsLayerTreeModel::connectToLayer( QgsLayerTreeLayer *nodeLayer )
// using unique connection because there may be temporarily more nodes for a layer than just one
// which would create multiple connections, however disconnect() would disconnect all multiple connections
// even if we wanted to disconnect just one connection in each call.
connect( layer, &QgsMeshLayer::editingStarted, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );
connect( layer, &QgsMeshLayer::editingStopped, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );
connect( layer, &QgsMeshLayer::layerModified, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );
connect( layer, &QgsMapLayer::editingStarted, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );
connect( layer, &QgsMapLayer::editingStopped, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );
connect( layer, &QgsMapLayer::layerModified, this, &QgsLayerTreeModel::layerNeedsUpdate, Qt::UniqueConnection );

emit dataChanged( node2index( nodeLayer ), node2index( nodeLayer ) );
}
Expand Down

0 comments on commit 9be0d9d

Please sign in to comment.