forward unhandled button events from MidiRegionView back to Editor
authorPaul Davis <paul@linuxaudiosystems.com>
Fri, 4 Mar 2011 15:16:21 +0000 (15:16 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Fri, 4 Mar 2011 15:16:21 +0000 (15:16 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9068 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_region_view.cc
gtk2_ardour/time_axis_view_item.cc

index ab11bb20bf96caa7b2208c1f52817973679e0728..1d4d42025845fa4abc19fefcca3393da76dfe40d 100644 (file)
@@ -377,16 +377,20 @@ MidiRegionView::mouse_mode_changed ()
 bool
 MidiRegionView::button_press (GdkEventButton* ev)
 {
+        if (ev->button != 1) {
+                return false;
+        }
+
         _last_x = ev->x;
         _last_y = ev->y;
-       
+        
         group->w2i (_last_x, _last_y);
         
         if (_mouse_state != SelectTouchDragging) {
-         
+                
                 _pressed_button = ev->button;
                 _mouse_state = Pressed;
-
+                
                 return true;
         }
         
@@ -401,6 +405,10 @@ MidiRegionView::button_release (GdkEventButton* ev)
        double event_x, event_y;
        framepos_t event_frame = 0;
 
+        if (ev->button != 1) {
+                return false;
+        }
+
         event_x = ev->x;
         event_y = ev->y;
        
index aa9fc24b23540cb6991a871165832ac4b7fa8eed..495efd578cbbf493e2f1591cc7e7feb4b60bfd3c 100644 (file)
@@ -243,6 +243,7 @@ TimeAxisViewItem::hide_rect ()
 
         if (name_highlight) {
                 name_highlight->property_outline_what() = 0x0;
+                name_highlight->property_fill_color_rgba() = UINT_RGBA_CHANGE_A(fill_color,64);
         }
 }
 
@@ -254,6 +255,7 @@ TimeAxisViewItem::show_rect ()
 
         if (name_highlight) {
                 name_highlight->property_outline_what() = 0x4;
+                name_highlight->property_fill_color_rgba() = fill_color;
         }
 }