Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /branches/no_more_qt3/src/gui/rulers/PercussionPitchRuler.cpp [r11697] .. [r11698] Maximize Restore

  Switch to side-by-side view

--- a/branches/no_more_qt3/src/gui/rulers/PercussionPitchRuler.cpp
+++ b/branches/no_more_qt3/src/gui/rulers/PercussionPitchRuler.cpp
@@ -52,7 +52,7 @@
     m_fontMetrics = new QFontMetrics(*m_font);
     m_width = m_fontMetrics->width("  A#2   Acoustic Bass Drum  ");
 
-    setPaletteBackgroundColor(QColor(238, 238, 224));
+//    setPaletteBackgroundColor(QColor(238, 238, 224));
 
     setMouseTracking(true);
 }
@@ -163,12 +163,10 @@
 
 void PercussionPitchRuler::mousePressEvent(QMouseEvent *e)
 {
-    Qt::ButtonState bs = e->state();
-
-	if (e->button() == Qt::LeftButton) {
+    if (e->button() == Qt::LeftButton) {
 
         m_mouseDown = true;
-        m_selecting = (bs & Qt::ShiftModifier);
+        m_selecting = (e->modifiers() & Qt::ShiftModifier);
 
         if (m_selecting)
             emit keySelected(e->y(), false);
@@ -179,7 +177,7 @@
 
 void PercussionPitchRuler::mouseReleaseEvent(QMouseEvent *e)
 {
-	if (e->button() == Qt::LeftButton) {
+    if (e->button() == Qt::LeftButton) {
         m_mouseDown = false;
         m_selecting = false;
     }