mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 20:26:30 +01:00
manual fixups for errors during rebasing against master
This commit is contained in:
parent
f392a28ea4
commit
2fceb66193
6 changed files with 21 additions and 110 deletions
|
|
@ -28,7 +28,7 @@ CueEditor::filter_to_unique_midi_region_views (RegionSelection const & ms) const
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
CueEditor::select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, Selection::Operation, bool)
|
CueEditor::select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, ARDOUR::SelectionOperation, bool)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class CueEditor : public EditingContext, public PBD::HistoryOwner, public sigc::
|
||||||
CueEditor (std::string const & name);
|
CueEditor (std::string const & name);
|
||||||
~CueEditor ();
|
~CueEditor ();
|
||||||
|
|
||||||
void select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, Selection::Operation, bool);
|
void select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, ARDOUR::SelectionOperation, bool);
|
||||||
|
|
||||||
void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const;
|
void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const;
|
||||||
StripableTimeAxisView* get_stripable_time_axis_by_id (const PBD::ID& id) const;
|
StripableTimeAxisView* get_stripable_time_axis_by_id (const PBD::ID& id) const;
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider
|
||||||
|
|
||||||
virtual ArdourCanvas::Duple upper_left() const { return ArdourCanvas::Duple (0, 0); }
|
virtual ArdourCanvas::Duple upper_left() const { return ArdourCanvas::Duple (0, 0); }
|
||||||
|
|
||||||
virtual void select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, Selection::Operation, bool) = 0;
|
virtual void select_all_within (Temporal::timepos_t const &, Temporal::timepos_t const &, double, double, TrackViewList const &, ARDOUR::SelectionOperation, bool) = 0;
|
||||||
virtual void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<std::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&) const = 0;
|
virtual void get_per_region_note_selection (std::list<std::pair<PBD::ID, std::set<std::shared_ptr<Evoral::Note<Temporal::Beats> > > > >&) const = 0;
|
||||||
virtual void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const = 0;
|
virtual void get_regionviews_by_id (PBD::ID const id, RegionSelection & regions) const = 0;
|
||||||
virtual StripableTimeAxisView* get_stripable_time_axis_by_id (const PBD::ID& id) const = 0;
|
virtual StripableTimeAxisView* get_stripable_time_axis_by_id (const PBD::ID& id) const = 0;
|
||||||
|
|
|
||||||
|
|
@ -6112,91 +6112,3 @@ Editor::upper_left() const
|
||||||
return get_trackview_group ()->canvas_origin ();
|
return get_trackview_group ()->canvas_origin ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
Editor::start_track_drag (TimeAxisView& tav, int y, Gtk::Widget& w, bool can_change_cursor)
|
|
||||||
{
|
|
||||||
track_drag = new TrackDrag (dynamic_cast<RouteTimeAxisView*> (&tav), *_session);
|
|
||||||
DEBUG_TRACE (DEBUG::TrackDrag, string_compose ("start track drag with %1\n", track_drag));
|
|
||||||
|
|
||||||
int xo, yo;
|
|
||||||
w.translate_coordinates (edit_controls_vbox, 0, y, xo, yo);
|
|
||||||
|
|
||||||
if (can_change_cursor) {
|
|
||||||
track_drag->drag_cursor = _cursors->move->gobj();
|
|
||||||
track_drag->predrag_cursor = gdk_window_get_cursor (edit_controls_vbox.get_window()->gobj());
|
|
||||||
gdk_window_set_cursor (edit_controls_vbox.get_toplevel()->get_window()->gobj(), track_drag->drag_cursor);
|
|
||||||
track_drag->have_predrag_cursor = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
track_drag->bump_track = nullptr;
|
|
||||||
track_drag->previous = yo;
|
|
||||||
track_drag->start = yo;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::mid_track_drag (GdkEventMotion* ev, Gtk::Widget& w)
|
|
||||||
{
|
|
||||||
int xo, yo;
|
|
||||||
w.translate_coordinates (edit_controls_vbox, ev->x, ev->y, xo, yo);
|
|
||||||
|
|
||||||
if (track_drag->first_move) {
|
|
||||||
|
|
||||||
/* move threshold */
|
|
||||||
|
|
||||||
if (abs (yo - track_drag->previous) < (int) (4 * UIConfiguration::instance().get_ui_scale())) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!track_drag->track->selected()) {
|
|
||||||
set_selected_track (*track_drag->track, Selection::Set, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!track_drag->have_predrag_cursor) {
|
|
||||||
track_drag->drag_cursor = _cursors->move->gobj();
|
|
||||||
track_drag->predrag_cursor = gdk_window_get_cursor (edit_controls_vbox.get_window()->gobj());
|
|
||||||
gdk_window_set_cursor (edit_controls_vbox.get_toplevel()->get_window()->gobj(), track_drag->drag_cursor);
|
|
||||||
track_drag->have_predrag_cursor = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
track_drag->first_move = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
track_drag->current = yo;
|
|
||||||
|
|
||||||
if (track_drag->current > track_drag->previous) {
|
|
||||||
if (track_drag->direction != 1) {
|
|
||||||
track_drag->bump_track = nullptr;
|
|
||||||
track_drag->direction = 1;
|
|
||||||
}
|
|
||||||
} else if (track_drag->current < track_drag->previous) {
|
|
||||||
if (track_drag->direction != -1) {
|
|
||||||
track_drag->bump_track = nullptr;
|
|
||||||
track_drag->direction = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (track_drag->current == track_drag->previous) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
redisplay_track_views ();
|
|
||||||
track_drag->previous = yo;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
Editor::end_track_drag ()
|
|
||||||
{
|
|
||||||
if (track_drag->have_predrag_cursor) {
|
|
||||||
gdk_window_set_cursor (edit_controls_vbox.get_toplevel()->get_window()->gobj(), track_drag->predrag_cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::TrackDrag, string_compose ("ending track drag with %1\n", track_drag));
|
|
||||||
delete track_drag;
|
|
||||||
track_drag = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
Editor::track_dragging() const
|
|
||||||
{
|
|
||||||
return (bool) track_drag;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -4403,8 +4403,8 @@ MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||||
/* we toggle on the button release */
|
/* we toggle on the button release */
|
||||||
break;
|
break;
|
||||||
case SelectionSet:
|
case SelectionSet:
|
||||||
if (!_editor->selection->selected (_marker)) {
|
if (!editing_context.get_selection().selected (_marker)) {
|
||||||
_editor->selection->set (_marker);
|
editing_context.get_selection().set (_marker);
|
||||||
_selection_changed = true;
|
_selection_changed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -4412,7 +4412,7 @@ MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||||
Locations::LocationList ll;
|
Locations::LocationList ll;
|
||||||
list<ArdourMarker*> to_add;
|
list<ArdourMarker*> to_add;
|
||||||
timepos_t s, e;
|
timepos_t s, e;
|
||||||
_editing_context.get_selection().markers.range (s, e);
|
editing_context.get_selection().markers.range (s, e);
|
||||||
s = min (_marker->position (), s);
|
s = min (_marker->position (), s);
|
||||||
e = max (_marker->position (), e);
|
e = max (_marker->position (), e);
|
||||||
s = min (s, e);
|
s = min (s, e);
|
||||||
|
|
@ -4420,9 +4420,9 @@ MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||||
if (e < timepos_t::max (e.time_domain ())) {
|
if (e < timepos_t::max (e.time_domain ())) {
|
||||||
e = e.increment ();
|
e = e.increment ();
|
||||||
}
|
}
|
||||||
_editor->session ()->locations ()->find_all_between (s, e, ll, Location::Flags (0));
|
_editor.session ()->locations ()->find_all_between (s, e, ll, Location::Flags (0));
|
||||||
for (Locations::LocationList::iterator i = ll.begin (); i != ll.end (); ++i) {
|
for (Locations::LocationList::iterator i = ll.begin (); i != ll.end (); ++i) {
|
||||||
Editor::LocationMarkers* lm = _editor->find_location_markers (*i);
|
Editor::LocationMarkers* lm = _editor.find_location_markers (*i);
|
||||||
if (lm) {
|
if (lm) {
|
||||||
if (lm->start) {
|
if (lm->start) {
|
||||||
to_add.push_back (lm->start);
|
to_add.push_back (lm->start);
|
||||||
|
|
@ -4433,7 +4433,7 @@ MarkerDrag::start_grab (GdkEvent* event, Gdk::Cursor* cursor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!to_add.empty ()) {
|
if (!to_add.empty ()) {
|
||||||
_editing_context.get_selection().add (to_add);
|
editing_context.get_selection().add (to_add);
|
||||||
_selection_changed = true;
|
_selection_changed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -4656,15 +4656,15 @@ MarkerDrag::finished (GdkEvent* event, bool movement_occurred)
|
||||||
SelectionOperation op = ArdourKeyboard::selection_type (event->button.state);
|
SelectionOperation op = ArdourKeyboard::selection_type (event->button.state);
|
||||||
switch (op) {
|
switch (op) {
|
||||||
case SelectionSet:
|
case SelectionSet:
|
||||||
if (_editor->selection->selected (_marker) && _editor->selection->markers.size () > 1) {
|
if (editing_context.get_selection().selected (_marker) && _editor.selection->markers.size () > 1) {
|
||||||
_editing_context.selection->set (_marker);
|
editing_context.get_selection().set (_marker);
|
||||||
_selection_changed = true;
|
_selection_changed = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SelectionToggle:
|
case SelectionToggle:
|
||||||
/* we toggle on the button release, click only */
|
/* we toggle on the button release, click only */
|
||||||
_editing_context.selection->toggle (_marker);
|
editing_context.get_selection().toggle (_marker);
|
||||||
_selection_changed = true;
|
_selection_changed = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -5609,14 +5609,14 @@ SelectionDrag::motion (GdkEvent* event, bool first_move)
|
||||||
if (first_move) {
|
if (first_move) {
|
||||||
if (_add) {
|
if (_add) {
|
||||||
/* adding to the selection */
|
/* adding to the selection */
|
||||||
_editor->set_selected_track_as_side_effect (SelectionAdd, gcd);
|
_editor.set_selected_track_as_side_effect (SelectionAdd, gcd);
|
||||||
_editor->clicked_selection = _editing_context.get_selection().add (start, end);
|
_editor.clicked_selection = editing_context.get_selection().add (start, end);
|
||||||
_add = false;
|
_add = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
/* new selection */
|
/* new selection */
|
||||||
if (_editor->clicked_axisview && !_editing_context.get_selection()selected (_editor->clicked_axisview)) {
|
if (_editor.clicked_axisview && !editing_context.get_selection().selected (_editor.clicked_axisview)) {
|
||||||
_editor->set_selected_track_as_side_effect (SelectionSet, gcd);
|
_editor.set_selected_track_as_side_effect (SelectionSet, gcd);
|
||||||
}
|
}
|
||||||
|
|
||||||
_editor.clicked_selection = editing_context.get_selection().set (start, end);
|
_editor.clicked_selection = editing_context.get_selection().set (start, end);
|
||||||
|
|
@ -6113,7 +6113,7 @@ RangeMarkerBarDrag::finished (GdkEvent* event, bool movement_occurred)
|
||||||
switch (editing_context.current_mouse_mode()) {
|
switch (editing_context.current_mouse_mode()) {
|
||||||
case MouseObject:
|
case MouseObject:
|
||||||
/* find the two markers on either side and then make the selection from it */
|
/* find the two markers on either side and then make the selection from it */
|
||||||
_editing_context.select_all_within (start, end, 0.0f, FLT_MAX, _editor->track_views, SelectionSet, false);
|
editing_context.select_all_within (start, end, 0.0f, FLT_MAX, _editor.track_views, SelectionSet, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MouseRange:
|
case MouseRange:
|
||||||
|
|
@ -6211,8 +6211,8 @@ NoteDrag::total_dx (GdkEvent* event) const
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we need to use absolute positions here to honor the tempo-map */
|
/* we need to use absolute positions here to honor the tempo-map */
|
||||||
timepos_t const t1 = pixel_to_time (_drags->current_pointer_x ());
|
timepos_t const t1 = pixel_duration_to_time (_drags->current_pointer_x ());
|
||||||
timepos_t const t2 = pixel_to_time (grab_x ());
|
timepos_t const t2 = pixel_duration_to_time (grab_x ());
|
||||||
|
|
||||||
/* now calculate proper `b@b` time */
|
/* now calculate proper `b@b` time */
|
||||||
timecnt_t dx = t2.distance (t1);
|
timecnt_t dx = t2.distance (t1);
|
||||||
|
|
@ -6260,10 +6260,7 @@ NoteDrag::total_dy () const
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double const y = _region->midi_context().y_position ();
|
double const y = _region->midi_context().y_position ();
|
||||||
double const p = current_pointer_y();
|
|
||||||
|
|
||||||
/* new current note */
|
/* new current note */
|
||||||
uint8_t n = _region->y_to_note (current_pointer_y () - y);
|
uint8_t n = _region->y_to_note (current_pointer_y () - y);
|
||||||
/* clamp */
|
/* clamp */
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,8 @@ public:
|
||||||
timepos_t end() const;
|
timepos_t end() const;
|
||||||
timepos_t nt_last() const { return end().decrement(); }
|
timepos_t nt_last() const { return end().decrement(); }
|
||||||
|
|
||||||
|
virtual timecnt_t tail () const { return timecnt_t (0); }
|
||||||
|
|
||||||
timepos_t source_position () const;
|
timepos_t source_position () const;
|
||||||
timecnt_t source_relative_position (Temporal::timepos_t const &) const;
|
timecnt_t source_relative_position (Temporal::timepos_t const &) const;
|
||||||
timecnt_t region_relative_position (Temporal::timepos_t const &) const;
|
timecnt_t region_relative_position (Temporal::timepos_t const &) const;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue