mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.26k stars 1.76k forks source link

Tile object wan't delete class/type if name - always this same #4053

Closed ManPython closed 2 months ago

ManPython commented 2 months ago

Describe the bug Tile object wan't delete class/type if name - always this same. On other objects is ok.

To Reproduce Steps to reproduce the behavior:

  1. Add name
  2. Add this same name class
  3. Try delete class/type as empty - for my case is turning back, this same on outline tree of objects

Expected behavior Delete class/type name

Media Related issue: https://github.com/mapeditor/tiled/issues/4051

Specifications:

bjorn commented 2 months ago

When you set a class on a tile, it is not possible to clear this class on a tile object using this tile. That is because the "empty" class means "inherit the class from the tile". So the only way to have no class at all on a tile object, is to erase the class field for both the object and the tile.

I don't consider this a bug. If you have a real need for specifying a class on the tile, but not seeing it on the tile object, you might want to explain your use-case.

ManPython commented 2 months ago

Not sure yet, but if this type algorithm exist, then when deleting name and exist "inherit" as other relation, then when trying delete should be log/info about no option due relations maybe. Then issue is more feature.

eishiya commented 2 months ago

When the class is inherited rather than set explicitly, it is greyed out like this, consistent with other inherited properties: image