maptool icon indicating copy to clipboard operation
maptool copied to clipboard

[Bug]: If a map with templates is copied and the copy's [Map -> Edit map… -> Pixels per Cell] is changed, templates sizes change on the original map

Open Baaaaaz opened this issue 2 years ago • 3 comments

Describe the Bug

If a map with templates is copied and the copy's [Map -> Edit map… -> Pixels per Cell] is changed, templates sizes change on the original map.

To Reproduce

Create a map and add all 8 template types. Make a copy of this map. Change the map scale using [Map -> Edit map… -> Pixels per Cell] to 50. Select the original map (which should have a Pixels per Cell of 100) Observe how the original templates have change size (well apart from Burst and Blast templates (which now in this case https://github.com/RPTools/maptool/issues/4524 works in this issue's favour!)

Expected Behaviour

Changing the grid size on one map should not affect templates on another map (even if they are copies). Drawing IDs for templates in a campaign should be unique (even if they are copies).

Screenshots

Original "Grasslands" Map: image

"Copy of Grasslands" map with changed Pixels per Cell = 50. Templates have changed size (well, apart from Burst & Blast templates) image

Now select original "Grasslands" map, and see how templates have incorrectly changed size image

MapTool Info

Occurs in 1.13.2 & 1.14.3

Desktop

Windows

Additional Context

No response

Baaaaaz avatar Dec 04 '23 19:12 Baaaaaz

Also note this bug only seems to be occur by changing the Pixels per Cell of the last of copy of a map. Does not seem to be occur when changing the scale of the original or intermediate copies. e.g.

  • take a map with templates on, copy it and then copy the copy. Changing the copy of the copy map's Pixels per Cell will also change the respective templates on both the original and copy maps.
  • take a map with templates on, copy it and then copy the copy. Changing the original map's Pixels per Cell does not affect the templates on the copy or copy of the copy maps.
  • take a map with templates on, copy it and then copy the copy. Changing the copy map's Pixels per Cell does not affect the templates on the original or copy of the copy maps.

Baaaaaz avatar Dec 04 '23 19:12 Baaaaaz

Also note: Using Draw Explorer we can see that the Drawing ID for a templates are the same across the copied maps, which may be part of the issue here as adding templates to the original after the map is copied are not affected by changing the Pixels per Cell to the copy map.

Baaaaaz avatar Dec 04 '23 19:12 Baaaaaz

This looks like a special case of #2433. But while that more general bug is still present, this particular issue should be fixed in #4753 now that templates no longer hold onto grid size state.

kwvanderlinde avatar Apr 17 '24 05:04 kwvanderlinde