tiled icon indicating copy to clipboard operation
tiled copied to clipboard

Updating tileset (.tsx) image does not update relevant tileset properties.

Open akakubiyaro opened this issue 1 year ago • 3 comments

Describe the bug The properties of a tileset does not update in response to changes in the source image. For example, if I have a tileset with 6 columns and I edit the source image so that it now has 8 columns, the tile palette will reflect the additional tiles but the tileset (.tsx) properties will still say 6 columns.

To Reproduce Steps to reproduce the behavior:

  1. Create a tileset with some source image.
  2. Update the source image so that it has more (or less tiles).
  3. Observe that the tile palette updates to reflect the modified tile image but the properties do not.

Expected behavior I would expect the tileset properties to update in order to reflect the updated image.

Specifications:

  • OS: Windows 10.
  • Tiled 1.9.0

akakubiyaro avatar Aug 15 '22 03:08 akakubiyaro

Duplicate of #1851

eishiya avatar Aug 15 '22 12:08 eishiya

I would expect the tileset properties to update in order to reflect the updated image.

You talk about multiple tile properties but you only mention the columns attribute as an example. What other properties did you notice were not being updated?

Also, did you actually save the tileset file after you had modified the image?

Duplicate of #1851

Hmm, while that issue is related to changing the amount of columns, it doesn't sound like a duplicate of this one to me.

bjorn avatar Aug 18 '22 14:08 bjorn

Hey bjorn, thanks for replying.

I recently upgraded my version of tiled to 1.9.1. Not sure this made a difference since I'm still experiencing some issues.

You talk about multiple tile properties but you only mention the columns attribute as an example. What other properties did you notice were not being updated?

After messing with the program further I've made some observations.

My workflow is generally as follows:

I make some tiles in Photoshop, export them as PNG, then I import them into the editor as a tileset. The .tsx file reflects all the correct data w/r to this FIRST import. i.e. image size, tile count, and columns. So does the properties palette in the editor.

So far so good.

I work on my map for a bit, then decide I need to add a tile. I tab over to Photoshop and add a new tile to the tile image. Export the png, replacing the previous version, and go back to tiled. I see the newly added tile in the tile palette and am able to paint the map with it etc.

But:

  1. If the "Edit Tileset" view is open in tiled, the tileset property palette isn't updated to reflect the current image. It has the previous stale data. In order to make it refresh you must close the tileset view and re-open it.

  2. The XML in the .tsx file is NOT updated at all. DESPITE the properties view now reflecting the changes in the image. Closing tiled does not modify the .tsx file and it remains with the stale data.

  3. In order to get the XML in the .tsx file to update, you must explicitly hit Ctrl+S or click the Save icon to get it to rewrite the new data. This is not indicated by the UI at all (like a little '*' being added to the title of the tileset). It also seems to me that the XML should be automatically updated when an image is modified.

Also, did you actually save the tileset file after you had modified the image?

No. Is this the expected behavior? If so, it seems very unintuitive since there is no indication in the editor that the tileset must be saved again. Further, as a user, I expect the tileset data in the file to always reflect what I'm seeing in the editor.

akakubiyaro avatar Aug 18 '22 15:08 akakubiyaro