|
|
|
|
@@ -112,6 +112,7 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Container *parent, RouteTimeAxisVi
|
|
|
|
|
, _last_event_y (0)
|
|
|
|
|
, pre_enter_cursor (0)
|
|
|
|
|
, pre_press_cursor (0)
|
|
|
|
|
, pre_note_enter_cursor (0)
|
|
|
|
|
, _note_player (0)
|
|
|
|
|
{
|
|
|
|
|
CANVAS_DEBUG_NAME (_note_group, string_compose ("note group for %1", get_item_name()));
|
|
|
|
|
@@ -149,6 +150,7 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Container *parent, RouteTimeAxisVi
|
|
|
|
|
, _last_event_y (0)
|
|
|
|
|
, pre_enter_cursor (0)
|
|
|
|
|
, pre_press_cursor (0)
|
|
|
|
|
, pre_note_enter_cursor (0)
|
|
|
|
|
, _note_player (0)
|
|
|
|
|
{
|
|
|
|
|
CANVAS_DEBUG_NAME (_note_group, string_compose ("note group for %1", get_item_name()));
|
|
|
|
|
@@ -195,6 +197,7 @@ MidiRegionView::MidiRegionView (const MidiRegionView& other)
|
|
|
|
|
, _last_event_y (0)
|
|
|
|
|
, pre_enter_cursor (0)
|
|
|
|
|
, pre_press_cursor (0)
|
|
|
|
|
, pre_note_enter_cursor (0)
|
|
|
|
|
, _note_player (0)
|
|
|
|
|
{
|
|
|
|
|
init (false);
|
|
|
|
|
@@ -223,6 +226,7 @@ MidiRegionView::MidiRegionView (const MidiRegionView& other, boost::shared_ptr<M
|
|
|
|
|
, _last_event_y (0)
|
|
|
|
|
, pre_enter_cursor (0)
|
|
|
|
|
, pre_press_cursor (0)
|
|
|
|
|
, pre_note_enter_cursor (0)
|
|
|
|
|
, _note_player (0)
|
|
|
|
|
{
|
|
|
|
|
init (true);
|
|
|
|
|
@@ -420,6 +424,7 @@ MidiRegionView::leave_notify (GdkEventCrossing*)
|
|
|
|
|
if (pre_enter_cursor) {
|
|
|
|
|
Editor* editor = dynamic_cast<Editor *> (&trackview.editor());
|
|
|
|
|
editor->set_canvas_cursor(pre_enter_cursor);
|
|
|
|
|
pre_enter_cursor = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
@@ -456,7 +461,7 @@ MidiRegionView::button_press (GdkEventButton* ev)
|
|
|
|
|
if (m == MouseObject && Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) {
|
|
|
|
|
pre_press_cursor = editor->get_canvas_cursor ();
|
|
|
|
|
editor->set_canvas_cursor (editor->cursors()->midi_pencil);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (_mouse_state != SelectTouchDragging) {
|
|
|
|
|
|
|
|
|
|
@@ -3116,7 +3121,7 @@ MidiRegionView::note_entered(NoteBase* ev)
|
|
|
|
|
{
|
|
|
|
|
Editor* editor = dynamic_cast<Editor*>(&trackview.editor());
|
|
|
|
|
|
|
|
|
|
pre_enter_cursor = editor->get_canvas_cursor ();
|
|
|
|
|
pre_note_enter_cursor = editor->get_canvas_cursor ();
|
|
|
|
|
|
|
|
|
|
if (_mouse_state == SelectTouchDragging) {
|
|
|
|
|
note_selected (ev, true);
|
|
|
|
|
@@ -3136,9 +3141,9 @@ MidiRegionView::note_left (NoteBase*)
|
|
|
|
|
|
|
|
|
|
editor->verbose_cursor()->hide ();
|
|
|
|
|
|
|
|
|
|
if (pre_enter_cursor) {
|
|
|
|
|
editor->set_canvas_cursor (pre_enter_cursor);
|
|
|
|
|
pre_enter_cursor = 0;
|
|
|
|
|
if (pre_note_enter_cursor) {
|
|
|
|
|
editor->set_canvas_cursor (pre_note_enter_cursor);
|
|
|
|
|
pre_note_enter_cursor = 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -3190,13 +3195,13 @@ MidiRegionView::note_mouse_position (float x_fraction, float /*y_fraction*/, boo
|
|
|
|
|
Editing::MouseMode mm = editor->current_mouse_mode();
|
|
|
|
|
bool trimmable = (mm == MouseObject || mm == MouseTimeFX || mm == MouseDraw);
|
|
|
|
|
|
|
|
|
|
if (trimmable && x_fraction > 0.0 && x_fraction < 0.2) {
|
|
|
|
|
editor->set_canvas_cursor (editor->cursors()->left_side_trim);
|
|
|
|
|
} else if (trimmable && x_fraction >= 0.8 && x_fraction < 1.0) {
|
|
|
|
|
editor->set_canvas_cursor (editor->cursors()->right_side_trim);
|
|
|
|
|
} else {
|
|
|
|
|
if (pre_enter_cursor && can_set_cursor) {
|
|
|
|
|
editor->set_canvas_cursor (pre_enter_cursor);
|
|
|
|
|
if (can_set_cursor) {
|
|
|
|
|
if (trimmable && x_fraction > 0.0 && x_fraction < 0.2) {
|
|
|
|
|
editor->set_canvas_cursor (editor->cursors()->left_side_trim);
|
|
|
|
|
} else if (trimmable && x_fraction >= 0.8 && x_fraction < 1.0) {
|
|
|
|
|
editor->set_canvas_cursor (editor->cursors()->right_side_trim);
|
|
|
|
|
} else if (pre_note_enter_cursor) {
|
|
|
|
|
editor->set_canvas_cursor (pre_note_enter_cursor);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|