You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a tileLayer that's getting added to a tileMap does not have a size set but tileMap does, then Tiled tries to set the layer's size tot he map size:
// If this map has a valid size but the tile layer that's getting added// doesn't, default the layer's size to the map size.if (editableLayer->isTileLayer()) {
auto editableTileLayer = static_cast<EditableTileLayer*>(editableLayer);
if (editableTileLayer->size().isNull() && !size().isNull())
editableTileLayer->setSize(size());
}
This however does not occur if the tilerLayer that's being added is part of a group layer.
To Reproduce
Via the js API, do the following:
create a tilemap with a certain size
create a groupLayer
create a tileLayer and add it to the groupLayer
Expected behavior
The tileLayer that's being added to the group should get the size set to the maps' size if it has a valid one.
Platform (please complete the following information):
OS: Windows 10
Version: Tiled 1.8.2
The text was updated successfully, but these errors were encountered:
…oup layer
Otherwise, scripts that add tile layers to group layers, before adding
the group layers to a map, and that do not explicitly set a size on
those tile layers, will end up with 0x0 layers that cause glitches and
do not save correctly.
Closes#3291
Describe the bug
If a tileLayer that's getting added to a tileMap does not have a size set but tileMap does, then Tiled tries to set the layer's size tot he map size:
This however does not occur if the tilerLayer that's being added is part of a group layer.
To Reproduce
Via the js API, do the following:
Expected behavior
The tileLayer that's being added to the group should get the size set to the maps' size if it has a valid one.
Platform (please complete the following information):
The text was updated successfully, but these errors were encountered: