- case Pressed: // Maybe start a drag, if we've moved a bit
-
- if (fabs (event_x - _last_x) < 1 && fabs (event_y - _last_y) < 1) {
- /* no appreciable movement since the button was pressed */
- return false;
- }
-
- if (_pressed_button == 1 && editor.current_mouse_mode() == MouseObject
- && !Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) {
- // Select drag start
-
- group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- Gdk::Cursor(Gdk::FLEUR), ev->time);
-
- _last_x = event_x;
- _last_y = event_y;
- _drag_start_x = event_x;
- _drag_start_y = event_y;
-
- _drag_rect = new ArdourCanvas::SimpleRect(*group);
- _drag_rect->property_x1() = event_x;
- _drag_rect->property_y1() = event_y;
- _drag_rect->property_x2() = event_x;
- _drag_rect->property_y2() = event_y;
- _drag_rect->property_outline_what() = 0xFF;
- _drag_rect->property_outline_color_rgba()
- = ARDOUR_UI::config()->canvasvar_MidiSelectRectOutline.get();
- _drag_rect->property_fill_color_rgba()
- = ARDOUR_UI::config()->canvasvar_MidiSelectRectFill.get();
-
- _mouse_state = SelectRectDragging;
- return true;
-
- } else if (editor.internal_editing()) {
- // Add note drag start
-
- group->grab(GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
- Gdk::Cursor(Gdk::FLEUR), ev->time);