Bug report #17795

Unable to edit filtered Shapefile Layer after reloading project

Added by Christian Roettger over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:Data Provider/OGR
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:Yes Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:25691

Description

This seems to be a new bug in 2.18.15 an not really related to #17507
You can't edit a shapefile anymore while a filter is active (CASE 1.). This was possible in .14 :( (its not possible with the linked buhtest.gpkg, too)
I tested this on an older qgis version (2.18.1) where editing the same filtered shape file is possible.

USE CASE:
1. filter shape file
2. save as project
3. reopen => no editing possible
4. remove filter, still no editing possible
5. reopen project => editing possible

Tested on Windows with 2.18.14 and 2.18.15 where it is even worse. In .15 you can't edit a shapefile anymore while a filter is active (CASE 1.). This was possible in .14 :(

More detailed System overview:
QGIS version 2.18.15
QGIS code revision ac2d111ed1
Compiled against Qt 4.8.5
Running against Qt 4.8.5
Compiled against GDAL/OGR 2.2.3
Running against GDAL/OGR 2.2.3
Compiled against GEOS 3.5.0-CAPI-1.9.0
Running against GEOS 3.5.0-CAPI-1.9.0 r4084
PostgreSQL Client Version 9.2.4
SpatiaLite Version 4.3.0
QWT Version 5.2.3
PROJ.4 Version 493
QScintilla2 Version 2.7.2

Associated revisions

Revision 9c853345
Added by Alessandro Pasotti over 6 years ago

[bugfix][ogr] Tests for capabilities update on filter changes

Fixes #17795

Revision ed86cb56
Added by Alessandro Pasotti over 6 years ago

[bugfix][ogr] Recompute capabilities when subsetfilter is set

Backported from master PR 6000

Fixes #17795

History

#1 Updated by Alessandro Pasotti over 6 years ago

  • Affected QGIS version changed from 2.18.15 to master

Also affects master

#3 Updated by Alessandro Pasotti over 6 years ago

  • Category changed from Data Provider to Data Provider/OGR

#4 Updated by Alessandro Pasotti over 6 years ago

  • Status changed from Open to In Progress

#5 Updated by Alessandro Pasotti over 6 years ago

  • Pull Request or Patch supplied changed from No to Yes

#6 Updated by Alessandro Pasotti over 6 years ago

Just to be clear: editing on a filtered layer won't be possible because of the way OGR provider construct a filtered layer, but the bug that prevent to edit a layer when the filter is removed/cleared has been addressed in the PR 6000

#7 Updated by Anonymous over 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

#8 Updated by Alessandro Pasotti over 6 years ago

  • Resolution set to fixed/implemented

Backporting now to 2.18

Also available in: Atom PDF