Commit 0a790c0d authored by Sven Langkamp's avatar Sven Langkamp
Browse files

crop layer to image bounds on saving as image

parent 6c001ea5
......@@ -923,10 +923,9 @@ void KisLayerManager::saveLayerAsImage()
d.setCurrentImage(dst);
KisPaintLayer* paintLayer = new KisPaintLayer(dst, "projection", l->opacity());
KisPainter gc(paintLayer->paintDevice());
gc.bitBlt(QPoint(0, 0), l->projection(), l->projection()->exactBounds());
gc.bitBlt(QPoint(0, 0), l->projection(), r);
dst->addNode(paintLayer, dst->rootLayer(), KisLayerSP(0));
dst->resize(paintLayer->exactBounds());
dst->refreshGraph();
d.setOutputMimeType(mimefilter.toLatin1());
......
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