Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy and paste of AutoMap Rules add that tileset a second time #3462

Closed
Seanba opened this issue Aug 27, 2022 · 1 comment
Closed

Copy and paste of AutoMap Rules add that tileset a second time #3462

Seanba opened this issue Aug 27, 2022 · 1 comment
Assignees
Labels
bug Broken behavior.

Comments

@Seanba
Copy link
Contributor

Seanba commented Aug 27, 2022

Describe the bug
When copying and pasting regions of tiles that include a tile from the Automap Rules tileset I've noticed that the Automap Rules tileset is added to the list of tilesets a second time.

To Reproduce
Steps to reproduce the behavior:

  1. Open or create a map
  2. Use the Map/Add Automapping Rules Tileset menu item to include that tileset
  3. Place some of these tiles in a layer in your map
  4. Use the Rectangular Select tool to select some of these tiles on your layer
  5. Copy the selection
  6. Paste the selection into your layer
  7. See that you now have AutoMap Rules in your list of tilesets twice

Expected behavior
If the Automap Rules is already included then don't add it again.

Media
image

Specifications:

  • OS: Windows 10
  • Tiled Version: 1.9.1
@Seanba Seanba added the bug Broken behavior. label Aug 27, 2022
@bjorn bjorn self-assigned this Aug 27, 2022
@bjorn
Copy link
Member

bjorn commented Aug 29, 2022

This appears to be caused by a slight difference in the path of the Automapping Rules Tileset. The one added by the action is loaded from ://automap-tiles.tsx, whereas the one that gets added after copy/paste is loaded from :/automap-tiles.tsx.

This also survives into the saved file:

 <tileset firstgid="22" source="://automap-tiles.tsx"/>
 <tileset firstgid="27" source=":/automap-tiles.tsx"/>

However, when loading this file the tilesets are "unduplicated", so some code somewhere realizes they are the same tileset, heh.

@bjorn bjorn closed this as completed in 48c4f85 Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior.
Projects
None yet
Development

No branches or pull requests

2 participants