On 6/17/2020 12:05 AM, Richard Duivenvoorde wrote:
But I try to reproduce now and I can't. Only thing I see is that if I
use the 'create new project from default project' from
settings/options/general (after setting the current project as default),
I see a 'project_default' in my 'Project/Open Recent' list...
So it maybe that I sometimes open that one... and as it is not a
template, it just opens as the default project and I save stuff in that
one...

For 3.10.5 -
I believe the problem is that the template file itself will be added to the Open Recent list.
Try this experiment. Create a template "my_template" (just so there's no confusion over a default template and what it means).
Save this to the template directory.
Open some random map and close it so that random map is the most recent.
Now select New from template.
Make changes or not - doesn't matter.
Close the new map you created from the template.
Now look at the most recent list - the template itself is the top of the list.

Second experiment -
select New From Template
Select Save As - note that the save directory is the template directory.

While I don't claim special expertise as a UI/UX designer, I will observe that in most programs, at least on Windows, when I create a new file from a template the default "Save" directory is NOT the template directory. Also, the template file is not added to the recent files list (though I can't be sure what happens if I actually edit and save the template intentionally.) Additionally, for most programs I use the template has a different file extension requiring an intentional Save As Template.

MIcha writes:
When you then do "Save..." the usual "File save" dialog opens to save to a new file. In the case of QGIS, when you use the "New from template..." option, it seems that you are actually opening the template project. Then, if you click "Save" (before "Save as...") any changes get saved back to the template.

For 3.10.5 this is not exactly true. If you Create From Template, edit, then hit "Save" , the project file name (at least on Win10) is blank. But as I have noted above, the default directory is the template directory, making it awfully easy to select the template file as the place to save. "Save As" has exactly the same behavior.

So in my perfect world I would have the following behaviors:
1. Templates would have file type .qgzt and .qgst. The actual file format would be identical to .qgz and .qgs respectively
2. After New From Template, Save and Save As would point to something other than the template directory, perhaps the last directory used to save a project or a default directory
3. A new "Save As Template" menu item is added to the File menu. This would save to the template directory using the .qgst and .qgzt extensions
4. Installers would look in the default template library for .qg[sz]files and change the extension to .gq[sz]t
5. Template files would only be added to Open Recent list after a "Save As Template" (and maybe not even then)
6 [bonus item] - Certain environments might want to be able to disable "Save As Template" to avoid confusing users or to enforce the use of a limited set of templates and to prevent overwriting templates by unauthorized users.


_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to