Commit 1fd7d2ee authored by Boudewijn Rempt's avatar Boudewijn Rempt

Removed a memory leak in kis_tool_brush; undo still doesn't work, because

I don't understand the transaction stuff yet.

svn path=/trunk/koffice/; revision=264834
parent 31b3c3df
......@@ -42,6 +42,7 @@ KAboutData * newKrayonAboutData()
aboutData->addAuthor("Laurent Montel",0, "lmontel@mandrakesoft.com");
aboutData->addAuthor("Toshitaka Fujioka", 0, "fujioka@kde.org");
aboutData->addAuthor("Patrick Julien", 0, "freak@codepimps.org");
aboutData->addAuthor("Boudewijn Rempt", 0, "boud@valdyas.org");
return aboutData;
}
......
......@@ -99,15 +99,8 @@ void KisToolBrush::paint(const QPoint & pos,
if (!currentImage) return;
QImage mask;
// Retrieve the mask of the brush used
QImage img = m_brush->img();
if (img.hasAlphaBuffer()) {
mask = img.createAlphaMask();
}
else {
mask = img.createHeuristicMask(true);
}
#if 0
kdDebug() << "mask depth: " << mask.depth() << endl;
#endif
......@@ -153,9 +146,9 @@ void KisToolBrush::paint(const QPoint & pos,
KisPaintDeviceSP device = currentImage -> activeDevice();
if (device) {
KisPainter p( device );
p.beginTransaction( "Brush" );
//p.beginTransaction( "Brush" );
p.bitBlt( pos.x(), pos.y(), COMPOSITE_OVER, tmpLayer.data());
p.endTransaction();
//p.endTransaction();
device->anchor();
}
currentImage->invalidate( pos.x(), pos.y(), tmpLayer->width(), tmpLayer->height() );
......
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