Ignore empty tiles when exporting tilesets and the "Ignore Empty" checkbox is checked (fix #3789)

This commit is contained in:
Martín Capello 2023-04-04 11:09:25 -03:00
parent a7e155a391
commit 7422abf490

View File

@ -1068,6 +1068,13 @@ void DocExporter::captureSamples(Samples& samples,
alreadyTrimmed = true;
}
}
// If "Ignore Empty" is checked and the item is a tile...
else if (m_ignoreEmptyCels && item.isOneImageOnly()) {
// Skip empty tile
if (is_empty_image(item.image.get()))
continue;
}
if (!alreadyTrimmed && m_trimSprite)
sample.setTrimmedBounds(spriteBounds);