Copy dragged image correctly when the transparent color isn't mask (fix #808)

This commit is contained in:
David Capello 2015-09-14 13:03:01 -03:00
parent 77e16cecd0
commit ace74fe391

View File

@ -677,7 +677,13 @@ void PixelsMovement::drawImage(doc::Image* dst, const gfx::Point& pt, bool rende
BlendMode::SRC);
color_t maskColor = m_maskColor;
if (m_opaque) {
// In case that Opaque option is enabled, or if we are drawing the
// image for the clipboard (renderOriginalLayer is false), we use a
// dummy mask color to call drawParallelogram(). In this way all
// pixels will be opaqued (all colors are copied)
if (m_opaque ||
!renderOriginalLayer) {
if (m_originalImage->pixelFormat() == IMAGE_INDEXED)
maskColor = -1;
else