Skip to content

Commit

Permalink
Fixed crash when saving two new maps using the same file name
Browse files Browse the repository at this point in the history
For new maps, the "reader format" was not being set, which caused
problems when these maps were reloaded, either manually or as a result
of the file changing on disk (which can happen externally or because of
creating another new map and saving it with the same file name).

Closes #1734
  • Loading branch information
bjorn committed Sep 12, 2017
1 parent da5849c commit f593b7b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/tiled/documentmanager.cpp
Expand Up @@ -496,6 +496,7 @@ bool DocumentManager::saveDocumentAs(Document *document)

MapFormat *format = helper.formatByNameFilter(selectedFilter);
mapDocument->setWriterFormat(format);
mapDocument->setReaderFormat(format);

} else if (auto tilesetDocument = qobject_cast<TilesetDocument*>(document)) {
if (selectedFilter.isEmpty())
Expand Down

0 comments on commit f593b7b

Please sign in to comment.