Merge pull request #2945 from vinayakvivek/104771-zita1

fix #104771: Dragging mouse up/down moves Zita1 controls the wrong way.
This commit is contained in:
Nicolas Froment 2017-01-02 20:55:34 +01:00 committed by GitHub
commit 3875a84148

View file

@ -109,14 +109,9 @@ void ZitaEffectGui::mouseMoveEvent(QMouseEvent* e)
{
if (r == -1)
return;
int dx = e->globalX() - mx;
int dy = e->globalY() - my;
if (dy > 0 && dy > dx)
dx = dy;
else if (dy < 0 && dy < dx)
dx = dy;
qreal v = oval;
v = v + dx * .01;
v = v - dy * .01;
if (v < 0)
v = 0;
else if (v > 1.0)