ldtk icon indicating copy to clipboard operation
ldtk copied to clipboard

Bug: Renaming layer only changes the layer definition.

Open cpuccino opened this issue 4 months ago • 3 comments

LDTK Version: 1.5.3 Expected: Both the identifiers of the layer def and the layer should match

"__type": "IntGrid",
"identifier": "Terrain2",
"type": "AutoLayer",
"uid": 4055,
"__identifier": "Base3",
"__type": "AutoLayer",
"__cWid": 40,
"__cHei": 25,
"__gridSize": 16,
"__opacity": 1,
"__pxTotalOffsetX": 0,
"__pxTotalOffsetY": 0,
"__tilesetDefUid": 1,
"__tilesetRelPath": "sprites2/terrains/tileset.png",
"iid": "46781850-5e50-11f0-9b16-0f5f57145bf5",
"levelId": 0,
"layerDefUid": 4055,

cpuccino avatar Aug 08 '25 10:08 cpuccino

Ok this is weird, I closed and re-opened the app, then spammed save, then it fixed itself lol. Feel free to close this? Curious to know though if there's some sort of "force fix" option somewhere - where it does a sanity check.


It seems to only be updating the identifier when i change something else about the layer (or maybe anything else). Like the layer visibility.


Current workaround: Change layer identifier, update visibility then revert visibility.

cpuccino avatar Aug 08 '25 11:08 cpuccino

There's probably some underlying bug that needs to be fixed 🤔

deepnight avatar Aug 11 '25 20:08 deepnight

It seems that it happens for __pxTotalOffset too, I wrote the steps to reproduce in #1188 .

Perhaps it applies to all the definition fields?

copyrat90 avatar Aug 16 '25 23:08 copyrat90