Fix my name :)
[ardour.git] / gtk2_ardour / midi_region_view.cc
index 0941806877abddbb65e551aebee0428ac72b0607..af3b624eebbf72620ce60842fced64c355860b8e 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2001-2007 Paul Davis
-    Author: Dave Robillard
+    Author: David Robillard
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -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;
        
@@ -1003,7 +1011,6 @@ MidiRegionView::redisplay_model()
        }
 
        if (!_model) {
-               cerr << "MidiRegionView::redisplay_model called without a model" << endmsg;
                return;
        }
 
@@ -2841,7 +2848,7 @@ void
 MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, bool can_set_cursor)
 {
        Editor* editor = dynamic_cast<Editor*>(&trackview.editor());
-
+        
         if (x_fraction > 0.0 && x_fraction < 0.25) {
                 editor->set_canvas_cursor (editor->cursors()->left_side_trim);
         } else if (x_fraction >= 0.75 && x_fraction < 1.0) {
@@ -3166,6 +3173,7 @@ MidiRegionView::create_ghost_note (double x, double y)
 
        boost::shared_ptr<NoteType> g (new NoteType);
        _ghost_note = new NoEventCanvasNote (*this, *_note_group, g);
+       _ghost_note->property_outline_color_rgba() = 0x000000aa;
        update_ghost_note (x, y);
        _ghost_note->show ();