mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-11 09:40:42 +00:00
Fix flatten layers command for linked cels
Avoid using the same linked cel in different frames when we merge layers.
This commit is contained in:
parent
9302c5d1bb
commit
f9131449fb
@ -16,6 +16,7 @@
|
|||||||
#include "app/cmd/copy_rect.h"
|
#include "app/cmd/copy_rect.h"
|
||||||
#include "app/cmd/remove_layer.h"
|
#include "app/cmd/remove_layer.h"
|
||||||
#include "app/cmd/remove_layer.h"
|
#include "app/cmd/remove_layer.h"
|
||||||
|
#include "app/cmd/unlink_cel.h"
|
||||||
#include "app/document.h"
|
#include "app/document.h"
|
||||||
#include "doc/cel.h"
|
#include "doc/cel.h"
|
||||||
#include "doc/layer.h"
|
#include "doc/layer.h"
|
||||||
@ -64,6 +65,9 @@ void FlattenLayers::onExecute()
|
|||||||
ImageRef cel_image;
|
ImageRef cel_image;
|
||||||
Cel* cel = background->cel(frame);
|
Cel* cel = background->cel(frame);
|
||||||
if (cel) {
|
if (cel) {
|
||||||
|
if (cel->links())
|
||||||
|
executeAndAdd(new cmd::UnlinkCel(cel));
|
||||||
|
|
||||||
cel_image = cel->imageRef();
|
cel_image = cel->imageRef();
|
||||||
ASSERT(cel_image);
|
ASSERT(cel_image);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user