r16945 by fschmid - Fixed Bug 10123: "It should be possible to remove stops from a gradient by dragging it horizontally out of the gradient"
scribus-commit
scribus-commit at lists.scribus.net
Tue Nov 1 11:54:24 UTC 2011
Author: fschmid
Date: Tue Nov 1 11:54:24 2011
New Revision: 16945
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16945
Log:
Fixed Bug 10123: "It should be possible to remove stops from a gradient by dragging it horizontally out of the gradient"
Modified:
trunk/Scribus/scribus/ui/gradientpreview.cpp
Modified: trunk/Scribus/scribus/ui/gradientpreview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16945&path=/trunk/Scribus/scribus/ui/gradientpreview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/gradientpreview.cpp (original)
+++ trunk/Scribus/scribus/ui/gradientpreview.cpp Tue Nov 1 11:54:24 2011
@@ -163,12 +163,13 @@
void GradientPreview::mouseReleaseEvent(QMouseEvent *m)
{
+ QRect insideRect = QRect(10, 43, width()-20, 13);
if (isEditable)
{
QRect fpo;
if (m->button() == Qt::LeftButton)
{
- if ((Mpressed) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)) && (outside || m->y() > 60))
+ if ((Mpressed) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)) && (outside || !insideRect.contains(m->pos())))
{
onlyselect = false;
fill_gradient.removeStop(ActStop);
@@ -233,6 +234,7 @@
void GradientPreview::mouseMoveEvent(QMouseEvent *m)
{
+ QRect insideRect = QRect(10, 43, width()-20, 13);
if (isEditable)
{
QRect fpo;
@@ -274,7 +276,7 @@
onlyselect = false;
repaint();
}
- if ((Mpressed) && (outside || m->y() > 60) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)))
+ if ((Mpressed) && (outside || !insideRect.contains(m->pos())) && (ActStop > 0) && (ActStop != static_cast<int>(StopM.count()-1)))
qApp->changeOverrideCursor(QCursor(loadIcon("DelPoint.png"), 1, 1));
}
}
More information about the scribus-commit
mailing list