When I rename property in Custom Types Editor, it do not rename changed property on the object in map.
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
When I rename property in Custom Types Editor, it do not rename changed property on the object in map.
To Reproduce
Steps to reproduce the behavior:
- Custom Types Editor -> Add Class "MyClass" -> Add Member "MyMember" (string)
- Add "MyClass" to any object "MyObject" in Tileset (*.tsx) / Property name = "MMPropName"
- Add "MyObject" into map (*.tmx)
- Change value of "MyMember" on the object in the map (*.tmx). Value = "MMValue"
- Rename "MyMember" to "MyNewMember" in Custom Types Editor
- In map we can see "MyNewMember" on the object, but old value (MMValue) is missing and the value is empty. And now we will change value of "MyNewMember" on the object in the map. Value = "MnewMValue"
In map file (*.tmx) is still "MyMember" with value "MMValue":
<property name="MMPropName" type="class" propertytype="MyClass">
<properties>
<property name="MyMember" value="MMValue"/> <--- THIS ROW SHOULD BE REMOVED, because we renamed "MyMember" and paramater with this name no more exists
<property name="MyNewMember" value="MnewMValue"/>
</properties>
</property>
If I will repeat steps 4-5-6 there will be more and more parameters that already not exists.
Expected behavior
In map file (*.tmx) parameter "MyMember" will be renamed to "MyNewMember" and old value will stay there. And old parametr "MyMember" will be removed.
EDIT: And probably : when I remove "MyClass" from the object in Tileset (*.tsx), it should remove "MyClass" from the object in the map (*.tmx) too. Now "MyClass" is still on the object in map even the object in *.tsx no more contains the "MyClass".
Specifications:
- OS: Windows 10
- Tiled Version: 1.11.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
Start by reproducing the rename workflow in the Custom Types Editor using a .tsx tileset and .tmx map, then inspect how class properties are serialized when the map is saved. Done means renaming preserves the existing value and removes the old property, without leaving duplicate obsolete properties after repeated edits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100