QuickToolBar: bugfix for GradientLine

This was just plain wrong.
A negative offset makes no sense in any
case.
This commit is contained in:
Thomas Hartmann
2010-08-13 17:18:41 +02:00
parent b372f9db02
commit 8a86265c74

View File

@@ -289,7 +289,7 @@ void GradientLine::mouseMoveEvent(QMouseEvent *event)
if ((newStop >=0) && (newStop <= 1)) if ((newStop >=0) && (newStop <= 1))
m_stops[currentColorIndex()] = newStop; m_stops[currentColorIndex()] = newStop;
m_yOffset += event->pos().y() - m_dragStart.y(); m_yOffset += event->pos().y() - m_dragStart.y();
if (m_yOffset > 0 || m_useGradient) { //deleting only in base state if (m_yOffset > 0) { //deleting only in base state
m_yOffset = 0; m_yOffset = 0;
} else if ((m_yOffset < - 12) && (currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) { } else if ((m_yOffset < - 12) && (currentColorIndex()) != 0 && (currentColorIndex() < m_stops.size() - 1)) {
m_yOffset = 0; m_yOffset = 0;