Feature request #8387
Warn users when saving projects that contain memory/scratch layers
|Pull Request or Patch supplied:||No||Resolution:||fixed/implemented|
|Easy fix?:||No||Copied to github as #:||17160|
When creating a layer using QuickWKT plugin, saving the project and reopening it, the layer isn't rendered on the map. You can still see its name in the layer manager, and the style in the icon of the layer manager but the data isn't there (or I can't find it).
May also have to do with not knowing the extent, I don't know for sure.
All I know is that I cannot save & reload a map that contains QuickWKT layers.
Would this be a plugin bug or a core bug ?
#2 Updated by Sandro Santilli about 7 years ago
Thanks for the hint !
I agree it should be part of the core, but until then even a notice warning the user about that would be nice to have. Something like: "data in layers X and Y only exists in memory and will be lost on restart, use plugin Z to save them as part of the project". Is that possible to have in 2.0 ?
#3 Updated by Regis Haubourg about 7 years ago
some background of previously discussed features here 
IMHO, this feature should be enabled by default. But we need to find a way to avoid having a qgs file + a mldata file, because user often will forget or delete the second one. One proposal in the list was to change qgs format. Two options:
1 - having xml store mldata directly (like arcgis / mapinfo), but we'll have heavy project, and maybe less stable.
2 - change qgs to a container zip file, containing ggs xml + generic resources (mldat, or sqlite storing equivalent, logos, symbols... ). This is a major break ..
All this have to be largely discussed.. In my corp, I use QGIS_PLUGINPATH variable to deploy mandatory plugins (including memory layer saver), and manage registry or ini files in user clients profiles thanks to Group Policy Tools of windows. I agree this is not perfect since some user deactivate that plugin.. and loose datas..
#9 Updated by Nathan Woodrow about 7 years ago
@Alessandro you missed my point. I still want those layers there as empty when I open the project next time. I don't want to have to create them each time and style them. They are really just empty cosmetic layers in some of my projects. If I need to persist them I will use the memory layer saver plugin, if not I just leave them to be cleared.
#10 Updated by Alessandro Pasotti about 7 years ago
- Assignee deleted (
@Nathan, don't you think that the "average user" can be confused by seeing that a memory layer is saved even it it doesn't contain any data? The original poster Sandro (who is NOT an average user) was.
Maybe I misunderstood the meaning of memory layer, I tend to consider them "temporary" layers, so I expect to loose all layers informations when I quit the project.
Of course the user should be warned about loosing data when leaves the project. He can still convert the layer into a persistant datasource and then it will be a "normal" layer.
BTW I'm not the right person to work on this "bug/feature request".
#11 Updated by Sandro Santilli about 7 years ago
I see Nathan point about wanting the emptied layers in the project. Personally I never used them as "drawing canvasses" so I missed this use case. In any case I think the user should be warned when closing a project if the data in its memory layers will be lost forever. It's the same kind of warning you get when closing without saving the project, so maybe category should be "GUI".