tiled
tiled copied to clipboard
Reset default value of class members the same way as for property values.
Users can reset custom property values by selecting them and hitting their keyboard's "delete" key.
I would love to have the same feature for resetting values of class members as this would feel very logical for me.
Afaik, I currently need to remove the entire class to reset one specific value of a class member within - and this feels quite stressful for me. Or is there another way?
Afaik, I currently need to remove the entire class to reset one specific value of a class member within - and this feels quite stressful for me. Or is there another way?
Yes, the way to reset class members is to click the value. To the right of the edit widget should be a small reset button, which you can use to reset class members:
Oh I didn't know that! Good, that works well. Then I guess this Task here can be resolved?
Oh I didn't know that! Good, that works well. Then I guess this Task here can be resolved?
Let's not close it, because I think making Delete key also perform a reset of the value is still a good idea, for both consistency and usability.
Good point! Another somehow bit related thing: Is there a reason why within a class the properties are auto-sorted alphabetically, but not in an enum's value list? I would like to have it alphabetically, too.
Another somehow bit related thing: Is there a reason why within a class the properties are auto-sorted alphabetically, but not in an enum's value list? I would like to have it alphabetically, too.
Well, a class is stored internally has a map, so the order is automatically alphabetical and irrelevant. In contrast, the order of the enum values is not irrelevant when the storage format is "number", in which case reordering them affects the values and would hence change the value of existing saved properties as well.
I still think reordering of enum values should be supported, but then we should associate the number value with each entry explicitly (a feature we should eventually have anyway), so that it can move along with the name.
I think this will then be solved with fixing this bug at the end? https://github.com/mapeditor/tiled/issues/3409
I think this will then be solved with fixing this bug at the end?
No, this issue ended up being about being able to use the Delete key to reset properties. This is still only possible for top-level properties, not yet for properties nested in a class.