mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Reset default value of class members the same way as for property values. #3297

UliAbo posted onGitHub

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:

image

posted by bjorn about 3 years ago

Oh I didn't know that! Good, that works well. Then I guess this Task here can be resolved?

posted by UliAbo about 3 years ago

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.

posted by bjorn about 3 years ago

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.

posted by UliAbo about 3 years ago

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.

posted by bjorn about 3 years ago

I think this will then be solved with fixing this bug at the end? https://github.com/mapeditor/tiled/issues/3409

posted by UliAbo over 2 years ago

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.

posted by bjorn over 2 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests