diff --git a/src/app/cmd/clear_mask.cpp b/src/app/cmd/clear_mask.cpp index 1cc6dc895..ca821b6e5 100644 --- a/src/app/cmd/clear_mask.cpp +++ b/src/app/cmd/clear_mask.cpp @@ -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 @@ -54,6 +54,8 @@ ClearMask::ClearMask(Cel* cel) m_dstImage.reset(new WithImage(image)); m_bgcolor = doc->bgColor(cel->layer()); + m_boundsX = bounds.x; + m_boundsY = bounds.y; m_copy.reset(crop_image(image, bounds.x, bounds.y, bounds.w, bounds.h, m_bgcolor)); @@ -112,7 +114,7 @@ void ClearMask::clear() void ClearMask::restore() { - copy_image(m_dstImage->image(), m_copy.get(), m_offsetX, m_offsetY); + copy_image(m_dstImage->image(), m_copy.get(), m_boundsX, m_boundsY); } } // namespace cmd diff --git a/src/app/cmd/clear_mask.h b/src/app/cmd/clear_mask.h index ae70dc144..94723fd91 100644 --- a/src/app/cmd/clear_mask.h +++ b/src/app/cmd/clear_mask.h @@ -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 @@ -42,6 +42,7 @@ namespace cmd { base::UniquePtr m_dstImage; ImageRef m_copy; int m_offsetX, m_offsetY; + int m_boundsX, m_boundsY; color_t m_bgcolor; };