Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed JSON tilesets getting saved in TSX format
The problem was that when an external tileset was opened as part of a map, there was no way for Tiled to derive the file format used by the tileset. Upon saving, it would default to using the TSX format, which was wrong if the tileset was loaded from a JSON file. This is now fixed by remembering the file format at the Tileset level, instead of in TilesetDocument (which libtiled doesn't know about). The fallback to the TSX format has been removed, since actually it should always be defined. When reading an external tileset, there is still a fallback to TSX format because external applications like tmxviewer and tmxrasterizer depend on it. It would be good to find some alternative for this however, since this fallback is unable to set the correct format on the loaded tileset. This also fixes the Reload action being disabled for such tilesets and even crashing Tiled when the file was changed on disk. Finally, a small fix was made to the Broken Links handling when you try to replace a tileset that couldn't be loaded with itself.
- Loading branch information
Showing
8 changed files
with
53 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters