mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-10 03:44:16 +00:00
Fix bug w/auto tileset mode adjusting tiles when we replace a unique instance of a tile+flag with a new tile
The assert() in remove_unused_tiles_from_tileset() checking for the tiles histograms was failing because we weren't adjusting the histogram correctly when a tile w/a flag is replaced w/another without flags.
This commit is contained in:
parent
ed649e6bab
commit
25f61ff5f9
@ -609,8 +609,9 @@ void modify_tilemap_cel_region(
|
||||
|
||||
// We add the new one tileIndex in the histogram count.
|
||||
if (tilesetMode == TilesetMode::Auto &&
|
||||
tileIndex != doc::notile &&
|
||||
tileIndex >= 0 && tileIndex < tilesHistogram.size()) {
|
||||
tile != doc::notile &&
|
||||
tileIndex >= 0 && tileIndex < tilesHistogram.size() &&
|
||||
ti != tileIndex) {
|
||||
++tilesHistogram[tileIndex];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user