make step edit cursor follow zoom (and change its color a bit)
[ardour.git] / gtk2_ardour / editor_drag.cc
index cab8a929ef290159e59b59e442c83bc2162fca15..98ceca5b8ae0330201bc8ba703e2a7690dda3001 100644 (file)
@@ -3107,9 +3107,9 @@ RubberbandSelectDrag::finished (GdkEvent* event, bool movement_occurred)
                _editor->begin_reversible_command (_("rubberband selection"));
 
                if (grab_frame() < last_pointer_frame()) {
-                       committed = _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op);
+                       committed = _editor->select_all_within (grab_frame(), last_pointer_frame() - 1, y1, y2, _editor->track_views, op, false);
                } else {
-                       committed = _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op);
+                       committed = _editor->select_all_within (last_pointer_frame(), grab_frame() - 1, y1, y2, _editor->track_views, op, false);
                }
 
                if (!committed) {
@@ -3504,7 +3504,7 @@ RangeMarkerBarDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
        Gdk::Cursor* cursor = 0;
 
        if (!_editor->temp_location) {
-               _editor->temp_location = new Location;
+               _editor->temp_location = new Location (*_editor->session());
        }
 
        switch (_operation) {
@@ -3625,7 +3625,10 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
                                flags = Location::IsRangeMarker;
                                _editor->range_bar_drag_rect->hide();
                        }
-                       newloc = new Location(_editor->temp_location->start(), _editor->temp_location->end(), rangename, (Location::Flags) flags);
+                       newloc = new Location (
+                               *_editor->session(), _editor->temp_location->start(), _editor->temp_location->end(), rangename, (Location::Flags) flags
+                               );
+                       
                        _editor->session()->locations()->add (newloc, true);
                        XMLNode &after = _editor->session()->locations()->get_state();
                        _editor->session()->add_command(new MementoCommand<Locations>(*(_editor->session()->locations()), &before, &after));
@@ -3659,7 +3662,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
                        switch (_editor->mouse_mode) {
                        case MouseObject:
                                /* find the two markers on either side and then make the selection from it */
-                               _editor->select_all_within (start, end, 0.0f, FLT_MAX, _editor->track_views, Selection::Set);
+                               _editor->select_all_within (start, end, 0.0f, FLT_MAX, _editor->track_views, Selection::Set, false);
                                break;
 
                        case MouseRange:
@@ -3872,7 +3875,7 @@ NoteDrag::motion (GdkEvent*, bool)
                region->move_selection (dx, dy);
 
                 char buf[12];
-                snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (cnote->note()->note()).c_str(),
+                snprintf (buf, sizeof (buf), "%s (%d)", Evoral::midi_note_name (cnote->note()->note() + drag_delta_note).c_str(),
                           (int) floor ((cnote->note()->note() + drag_delta_note)));
                _editor->show_verbose_canvas_cursor_with (buf);
         }