mapeditor/tiled

When Resize Map , the objects in the object-layer will be removed #3377

finscn posted onGitHub

Describe the bug When Resize Map , the objects in the object-layer will be removed

To Reproduce Steps to reproduce the behavior:

  1. create 2 tile-layers , and 1 object-layer
  2. put some objets in object-layer, and move them to the outside of tiled-area, like image: (see the image-1
  3. resize the map
  4. the objets will be removed

Expected behavior tile-layer will be resized, but the objects in the object-layer won't.

Media <img width="153" alt="image" src="https://user-images.githubusercontent.com/288367/171551595-34cb48ef-6fa3-499b-965b-067fa5800228.png"> image-1

Specifications:

  • OS: maxOS
  • Tiled Version: 1.8.5

This behavior can be turned on/off using the "Remove objects outside of the map" option at the bottom of the resize dialog:

image

Or are you resizing the map through "Crop to Selection" or "Autocrop" actions? In that case objects are always removed. Maybe this behavior could be tweaked such that only those objects will be removed, which were not previously outside of the map?

In general I think removing these objects is helpful, but I understand it's not always desired.

posted by bjorn almost 3 years ago

I find the removing rather useful as well, so I'm happy with Autocrop and Crop to Selectioh deleting objects that are outside the map. Though I haven't used it this way myself, I can see Autocrop being a great quick way to remove all objects that ended up outside of the map bounds due to previous edits or via scripts (e.g. random object scatter tool).

I think the object removal behaviour would be better off as a setting in Preferences or something ): Perhaps the Resize Map object removal toggle can be set according to that setting every time, instead of saving the value independently.

posted by eishiya almost 3 years ago

got. Thanks

posted by finscn almost 3 years ago

Fund this Issue

$0.00
Funded

Pull requests