Navigation Menu

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

Offsetting map over map size on "infinite" mode loses data #1866

Closed
aristotaloss opened this issue Jan 27, 2018 · 3 comments
Closed

Offsetting map over map size on "infinite" mode loses data #1866

aristotaloss opened this issue Jan 27, 2018 · 3 comments
Labels
bug Broken behavior.

Comments

@aristotaloss
Copy link

aristotaloss commented Jan 27, 2018

When offsetting a map as a whole on "infinite" mode, offsetting outside the map bounds deletes the map data that would fall off instead of A) resizing the map or B) handling it in a way where map size is ignored.

Reproduction steps:

  • Create a new 100x100 infinite map
  • Create a couple tiles
  • Map -> Offset map...
  • Set x and y offsets to 1000
  • Notice map data is gone

Way around this issue is to go to map->resize, then resize the map to a large enough data set and then reposition the map.

Version: latest development snapshot from itch.io page (2018.01.23)

@ketanhwr
Copy link
Contributor

Hmm this is strange.

@bjorn bjorn added the bug Broken behavior. label Jan 30, 2018
@bjorn
Copy link
Member

bjorn commented Jan 30, 2018

Well, it's because TileLayer::offsetTiles only writes within the boundaries it is given. We'll probably need to handle infinite maps specially here.

I also noticed the "Wrap" checkboxes always get disabled for infinite maps, which is not what we want, because it still makes sense to enable them in case you're offsetting within a selection.

I'll see if I can still include a fix for this in the Tiled 1.1.2 release I am planning to do tomorrow.

@bjorn bjorn closed this as completed in cff126c Jan 31, 2018
@aristotaloss
Copy link
Author

Awesome job, @bjorn :)

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

3 participants