Copy user data when we unlink cels

This commit is contained in:
David Capello 2016-02-01 10:58:29 -03:00
parent b3a95266d7
commit 3d23336815

View File

@ -1,5 +1,5 @@
// Aseprite
// Copyright (C) 2001-2015 David Capello
// Copyright (C) 2001-2016 David Capello
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@ -38,6 +38,7 @@ void UnlinkCel::onExecute()
ImageRef imgCopy(Image::createCopy(oldCelData->image()));
CelDataRef celDataCopy(new CelData(*oldCelData));
celDataCopy->setImage(imgCopy);
celDataCopy->setUserData(oldCelData->userData());
if (m_newImageId) {
imgCopy->setId(m_newImageId);