mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
When changing layer data paths through the layer tree menu, ensure
that existing subset strings are correctly applied after the layer path is changed Previously this only worked when repairing a broken layer path, but we should also maintain the filter when a valid layer's path is changed.
This commit is contained in:
parent
00ce537e41
commit
64f2c42b0b
@ -7676,7 +7676,7 @@ void QgisApp::changeDataSource( QgsMapLayer *layer )
|
||||
QString subsetString;
|
||||
// Get the subset string directly from the data provider because
|
||||
// layer's method will return a null string from invalid layers
|
||||
if ( !layerWasValid && vlayer && vlayer->dataProvider() &&
|
||||
if ( vlayer && vlayer->dataProvider() &&
|
||||
vlayer->dataProvider()->supportsSubsetString() &&
|
||||
!vlayer->dataProvider()->subsetString( ).isEmpty() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user