YoannQDQ / qgis-memory-layer-saver

Makes data in memory provider layers persistent between QGIS sessions. Data saved in .mldata file alongside project file.
Other
7 stars 4 forks source link

Filtered features get lost #5

Closed fuzzysolutions closed 6 years ago

fuzzysolutions commented 6 years ago

As far as I see, MLS plugin does not save features that have been filtered from a memory layer (see below). This might be a handy feature in order to reduce the size of the .mldata file. However, it is not always intended, so I'd prefer to have that optional.

Detailed description: I create a memory point layer and some random points with an "ID" field that i populate with numbers. I use "Filter ..." to select all features with IDs below 4 for display. mls_1

When saving the project and restarting QGIS, the filter expression is gone and when I search for all values in "ID" field, only 0-3 appear. All information about points no. 4, 5 and 6 seems to be lost. mls_2

ccrook commented 6 years ago

@fuzzysolutions Thanks for letting me know about this - I've never considered filtered memory layers. I'll have a look over the next day or two.

ccrook commented 6 years ago

@fuzzysolutions Fixed in version 3.7 (357b4d27) but note that in version 2.18 the Memory Provider does not preserve the subset filter in the project, so that filtered features reappear when the project is reloaded.

ccrook commented 6 years ago

@fuzzysolutions Uploaded version 3.8 which also saves the subset string for the memory layers.

fuzzysolutions commented 6 years ago

v3.7 works fine. In v3.8 the subset string is preserved, but only the first feature is being saved.

ccrook commented 6 years ago

@fuzzysolutions .. carelessly left in some debugging code. Long term plan is definitely to get some automatic testing in place!! Fixed in 3.9

fuzzysolutions commented 6 years ago

@ccrook Thanks for your quick reaction. 3.9 is perfect.