mapper icon indicating copy to clipboard operation
mapper copied to clipboard

Templates should be able to be named independently of file name

Open mpickering opened this issue 7 years ago • 7 comments

The template display window shows the filename of the file which was used to make the template. For various reasons, it might be desirable to give a template a different name. The only way to do this is to rename the original file and reimport it. Losing the template position and so on.

An extra layer of indirection to separate the name of the template from the filename would be appreciated.

mpickering avatar Feb 24 '18 16:02 mpickering

Nice to have.

BTW if you want to reuse a template's positioning for a second template, you can duplicate the first one, and then exchange the template file of the second one.

dg0yt avatar Feb 25 '18 17:02 dg0yt

It might be useful to be able to save templates (images) after correcting georeferencing errors. Saving the image and a world file would be a good place to give it a new name. This came up in connection with georeferenced images using EPSG:4326.

sfroyen avatar Sep 07 '20 20:09 sfroyen

The only way to do this is to rename the original file and reimport it. Losing the template position and so on.

Ummm. From my experience, it is possible to choose a new file without losing the template position after double-clicking on the template entry in the Templates window. So the workflow - rename file in the background, double click the template entry, choose the renamed file should work, in my opinion.

lpechacek avatar Sep 09 '20 13:09 lpechacek

I implemented that feature:

https://github.com/user-attachments/assets/4fad99e0-889e-4deb-9a40-b377e4b0e696

The custom name and the name preference are stored in the map file. Changing the custom name marks the map as having unsaved changes while changing the name preference does not (similar to changing the visibility or opacity of templates which does also not mark the map as having unsaved changes). Current versions of Mapper will open such a map file while ignoring the new properties.

dl3sdo avatar Jul 02 '25 15:07 dl3sdo

With regard to the video: IMO another dialog should be avoided. Editing can be supported in-place in the table, at least for the desktop UI.

dg0yt avatar Jul 02 '25 15:07 dg0yt

Your proposal would be to enter a custom name on right (or left?) click (left double-click opens the file dialog)? There would be no option to show the filename unless the custom name is cleared. But that may be acceptable since the filename is shown when hovering over the custom name.

dl3sdo avatar Jul 02 '25 21:07 dl3sdo

I removed the context menu on right-click and added the functionality to the menu shown by clicking on the 'Edit' button to be more consistent with the current UI:

https://github.com/user-attachments/assets/5b310ac3-390b-4fe2-b692-0e4964666e5c

dl3sdo avatar Jul 12 '25 19:07 dl3sdo