[Digikam-devel] extragear/graphics/digikam/libs/widgets/imageplugins
Andi Clemens
andi.clemens at gmx.net
Mon Jul 13 22:46:55 BST 2009
SVN commit 996141 by aclemens:
I would suggest to display the draw cursor all the time, so it is
easier to set the correct size in the panel.
Right now we show the cursor only when pressing the mouse.
One question: Why do we allow to set a size of 100 in the panel for the
brush size, but disallow the maximum size in the mouseMoveEvent?
In there we only allow a max size of 64, which looks weird, because the
mask "blob" we draw is bigger as the cursor.
Is this some old, "wrong" code?
Andi
CCMAIL:digikam-devel at kde.org
M +7 -4 imageguidewidget.cpp
--- trunk/extragear/graphics/digikam/libs/widgets/imageplugins/imageguidewidget.cpp #996140:996141
@@ -720,7 +720,7 @@
d->spot.setX(e->x()-d->rect.x());
d->spot.setY(e->y()-d->rect.y());
}
- else if ((e->buttons() & Qt::LeftButton) && d->drawingMask)
+ else if (d->enableDrawMask)
{
int size = d->penWidth;
if (size>64)
@@ -731,9 +731,12 @@
p.drawEllipse( 0, 0, size-1, size-1);
setCursor(QCursor(pix));
- QPoint currentPos = QPoint(e->x()-d->rect.x(), e->y()-d->rect.y());
- drawLineTo(currentPos);
- updatePreview();
+ if ((e->buttons() & Qt::LeftButton) && d->drawingMask)
+ {
+ QPoint currentPos = QPoint(e->x()-d->rect.x(), e->y()-d->rect.y());
+ drawLineTo(currentPos);
+ updatePreview();
+ }
}
}
else
More information about the Digikam-devel
mailing list