New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Enum Property Type loses dropdown menu on re-opening editor #3301
Comments
|
Probably caused by not actually having a project saved, which is what stores the custum enums. I will patch this up in 1.8.3, such that editing property types is only possible after saving a project. Either that or introduce saving for the default project. |
|
I don't know if there's anything extra I have to do but I already work from a project file where the described situation occurs. Looking at the project source file, I do see the enumerators properly listed. However, looking at any map's TMX file, I do not see the object tile's custom properties actually referring the property by its property type, id or otherwise. The custom property just appears as its regular name/value key. Interestingly, global map custom properties do refer to the enumerator properly by correctly using the "propertytype" value. |
Hmm, I currently have no explanation for this and I've just tested it by setting an enum property on a tile and on a tile objects, which in both cases was saved as expected (with the <object id="238" type="coin" gid="18" x="1152" y="480" width="64" height="64">
<properties>
<property name="state" propertytype="State" value="Closed"/>
</properties>
</object>and <tile id="0">
<properties>
<property name="state" propertytype="State" value="Locked"/>
</properties>
<image width="160" height="192" source="alter.png"/>
</tile>Any additional information about how I might be able to reproduce this issue would be very welcome! |
|
With a completely new project and empty map, it works as expected though I am still unsure why my production project doesn't, I keep re-adding the enumerators to the types and it refuses to save them properly, every time. The project file and maps were created in version 1.7 and had upgraded to 1.8 during production. The following seems not to work for some reason when we don't put the custom enumerator on a tile (with and without project file):
In one instance, actually, after creating an enumerator with its default name, I was unable to even see it in the list for the object type until I restarted the application. But that's unrelated to this issue. |
Yes, that was fixed in 69cd4a0, which will be in Tiled 1.8.3. I wonder if it's really unrelated. I'll try again with your last steps. |
|
Alright, to reproduce this issue, the project should not have an I think the real fix for this is to move the object types into the project as well, something I had started to work on in #3123. Or, to merge these things together in some way. For Tiled 1.8, I think a potential fix might be to reload the object types, after the project has been loaded. |
|
That should do it, I wasn't even aware of such a file or setting! Thank you for your hard work, I will await the next patch with patience. :) |
Describe the bug
After defining several strings to become a custom enum property type, the options drop-down menu disappears from an object's custom properties when re-opening the map. To restore the dropdown menu, you'd have to re-add the custom property to the object. I understand the value is saved as string in the file, which is working as intended, but I expect the dropdown menu to always be there if the property is defined as such.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the dropdown menu to be present so altering a value, even after re-opening a map, remains convenient.
Specifications:
The text was updated successfully, but these errors were encountered: