Commit 1f527d00 authored by Cyrille Berger's avatar Cyrille Berger
Browse files

fix the duplicate op here

svn path=/trunk/koffice/; revision=544157
parent b18ead66
......@@ -116,7 +116,7 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
KisPainter copyPainter(srcdev);
copyPainter.bitBlt(0, 0, COMPOSITE_COPY, device, srcPoint.x(), srcPoint.y(), sw, sh);
copyPainter.end();
// Convert the dab to the colorspace of a selection
dab->convertTo(KisMetaRegistry::instance()->csRegistry()->getAlpha8());
......@@ -150,11 +150,11 @@ void KisDuplicateOp::paintAt(const KisPoint &pos, const KisPaintInformation& inf
sh = dstRect.height();
if (m_source->hasSelection()) {
m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab,
m_painter->bltSelection(dstRect.x(), dstRect.y(), m_painter->compositeOp(), target,
m_source->selection(), m_painter->opacity(), sx, sy, sw, sh);
}
else {
m_painter->bitBlt(dstRect.x(), dstRect.y(), m_painter->compositeOp(), dab, m_painter->opacity(), sx, sy, sw, sh);
m_painter->bitBlt(dstRect.x(), dstRect.y(), m_painter->compositeOp(), target, m_painter->opacity(), sx, sy, sw, sh);
}
m_painter->addDirtyRect(dstRect);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment