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
Velocity- opened this issue Jan 27, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@Velocity-
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jan 27, 2018

Hmm this is strange.

@bjorn bjorn added the bug label Jan 30, 2018

@bjorn

This comment has been minimized.

Copy link
Owner

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 in cff126c Jan 31, 2018

@Velocity-

This comment has been minimized.

Copy link
Author

commented Jan 31, 2018

Awesome job, @bjorn :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.