Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update vector extents after changing data source for a vector layer
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Mar 27, 2020
1 parent 2f8a301 commit fa9d918
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -7429,6 +7429,9 @@ void QgisApp::changeDataSource( QgsMapLayer *layer )
vlayer->setSubsetString( subsetString );
}

if ( vlayer )
vlayer->updateExtents();

// All the following code is necessary to refresh the layer
QgsLayerTreeModel *model = qobject_cast<QgsLayerTreeModel *>( mLayerTreeView->model() );
if ( model )
Expand Down

0 comments on commit fa9d918

Please sign in to comment.