/*
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
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;
}
double event_x, event_y;
framepos_t event_frame = 0;
+ if (ev->button != 1) {
+ return false;
+ }
+
event_x = ev->x;
event_y = ev->y;
}
if (!_model) {
- cerr << "MidiRegionView::redisplay_model called without a model" << endmsg;
return;
}
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) {
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 ();