mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Fix keeping tiles (that are removed) references into clipboard
Without this fix we can reproduce an ASSERT() fail in Object::setId() from AddTile::onRedo() (or RemoveTile::onUndo()) doing the following steps: 1. Creating a tilemap layer with some tiles 2. Selecting a set of tiles (in tile mode) and using "Edit > Cut" (this was creating a copy of the tileset with the original images) 3. Resizing tileset to 0 (to remove all tiles) 4. And then undoing (to restore all removed tiles) The ASSERT() was because the restored tiles wanted to use the same ID of the tile images in the clipboard.
This commit is contained in:
parent
3ef3ee68e0
commit
e066d45eb6
@ -269,7 +269,7 @@ bool Clipboard::copyFromDocument(const Site& site, bool merged)
|
||||
image,
|
||||
(mask ? new Mask(*mask): nullptr),
|
||||
(pal ? new Palette(*pal): nullptr),
|
||||
new Tileset(*ts),
|
||||
Tileset::MakeCopyCopyingImages(ts),
|
||||
true, // set native clipboard
|
||||
site.layer() && !site.layer()->isBackground());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user