Fix copy and paste of ref layer cels

This commit is contained in:
David Capello 2016-11-07 12:35:45 -03:00
parent e89bea49df
commit 6aee765731

View File

@ -1,5 +1,5 @@
// Aseprite // Aseprite
// Copyright (C) 2001-2015 David Capello // Copyright (C) 2001-2016 David Capello
// //
// This program is distributed under the terms of // This program is distributed under the terms of
// the End-User License Agreement for Aseprite. // the End-User License Agreement for Aseprite.
@ -70,7 +70,14 @@ Cel* create_cel_copy(const Cel* srcCel,
0, 0, 255, BlendMode::SRC); 0, 0, 255, BlendMode::SRC);
} }
dstCel->setPosition(srcCel->position()); if (srcCel->layer() &&
srcCel->layer()->isReference()) {
dstCel->setBoundsF(srcCel->boundsF());
}
else {
dstCel->setPosition(srcCel->position());
}
dstCel->setOpacity(srcCel->opacity()); dstCel->setOpacity(srcCel->opacity());
dstCel->data()->setUserData(srcCel->data()->userData()); dstCel->data()->setUserData(srcCel->data()->userData());