From 69427576250f7fcfdf0e1fb28658790f4b2077bb Mon Sep 17 00:00:00 2001
From: Florian Jung <flo@windfisch.org>
Date: Mon, 23 May 2011 16:37:26 +0000
Subject: corrected reversed contollers in part canvas (cakewalk mode)

---
 muse2/muse/arranger/pcanvas.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'muse2')

diff --git a/muse2/muse/arranger/pcanvas.cpp b/muse2/muse/arranger/pcanvas.cpp
index daaf2d28..9b0a65b9 100644
--- a/muse2/muse/arranger/pcanvas.cpp
+++ b/muse2/muse/arranger/pcanvas.cpp
@@ -1730,7 +1730,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
                   int hoffset = (mt->height() - th ) / 2; // offset from bottom
 
                   if (ctrl_type == CTRL_PITCH)
-                    p.drawLine(t, hoffset + r.y() + th/2, t, hoffset + r.y() + val*th/8192/2 + th/2);
+                    p.drawLine(t, hoffset + r.y() + th/2, t, hoffset + r.y() - val*th/8192/2 + th/2);
             }
       }
 
@@ -1747,7 +1747,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
                   int hoffset = (mt->height() - th ) / 2; // offset from bottom
 
                   if (ctrl_type == 10)
-                    p.drawLine(t, hoffset + r.y() + val*th/127, t, hoffset + r.y() + th);
+                    p.drawLine(t, hoffset + r.y() + th - val*th/127, t, hoffset + r.y() + th);
             }
       }
 
@@ -1764,7 +1764,7 @@ void PartCanvas::drawMidiPart(QPainter& p, const QRect&, EventList* events, Midi
                   int hoffset = (mt->height() - th ) / 2; // offset from bottom
 
                   if (ctrl_type == 7)
-                    p.drawLine(t, hoffset + r.y() + val*th/127, t, hoffset + r.y() + th);
+                    p.drawLine(t, hoffset + r.y() + th - val*th/127, t, hoffset + r.y() + th);
             }
       }
 
-- 
cgit v1.2.3