Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tiled/tilesetchanges.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RenameTileset::RenameTileset(TilesetDocument *tilesetDocument,
"Change Tileset Name"))
, mTilesetDocument(tilesetDocument)
, mOldName(tilesetDocument->tileset()->name())
, mNewName(newName)
, mNewName(newName.trimmed())
{}

void RenameTileset::undo()
Expand Down
2 changes: 1 addition & 1 deletion src/tiled/tilesetdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void TilesetDocument::removeMapDocument(MapDocument *mapDocument)

void TilesetDocument::setTilesetName(const QString &name)
{
mTileset->setName(name);
mTileset->setName(name.trimmed());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since setTilesetName is only called from RenameTileset, this change seems superfluous. The only thing it changes, is that the previous name will also be trimmed on undoing a tileset rename. But I don't think that's what we want.

emit tilesetNameChanged(mTileset.data());

for (MapDocument *mapDocument : mapDocuments())
Expand Down
Loading