"Detach templates" does not work with "Repeat last export on save" when exporting to the same file.
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
Describe the bug
With both "Detach templates" and "Repeat last export on save" options enabled, when last export was to the same file that is being edited - templates do not detach, you still get <object id="59" template="chest.tx" x="15" y="94"/> all over the file.
Steps to reproduce
- Create and save map in the "Map.tmx" file.
- Open it, go into the preferences, set "Detach templates" and "Repeat last export on save".
- Now export this map into itself "Map.tmx"
- Now add some templates on the map.
- Now press Ctrl+S to save the map(Which should perform last export and trigger template detaching).
- Open "Map.tml" in the text editor and observe that templates did no detach, you have "template" objects everywhere.
Expected behavior
Templates should detach.
OS version
Windows 10
Tiled version
1.12.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with "Detach templates" and "Repeat last export on save" enabled, exporting Map.tmx to itself, then saving after adding templates. Start at the Ctrl+S save path and the repeat-last-export handling, and compare it with a normal export. Done means saving detaches the template objects in the resulting Map.tml.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100