mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 15:36:24 +01:00
refactor point-selection-changed logic "up" into EditingContext
This commit is contained in:
parent
c15556568e
commit
13161a3975
7 changed files with 23 additions and 1 deletions
|
|
@ -229,6 +229,7 @@ EditingContext::EditingContext (std::string const & name)
|
|||
full_zoom_button.set_name ("zoom button");
|
||||
full_zoom_button.set_icon (ArdourIcon::ZoomFull);
|
||||
|
||||
selection->PointsChanged.connect (sigc::mem_fun(*this, &EditingContext::point_selection_changed));
|
||||
|
||||
for (int i = 0; i < 16; i++) {
|
||||
char buf[4];
|
||||
|
|
|
|||
|
|
@ -341,6 +341,8 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider
|
|||
|
||||
void reset_point_selection ();
|
||||
|
||||
virtual void point_selection_changed () = 0;
|
||||
|
||||
/** Set the mouse mode (gain, object, range, timefx etc.)
|
||||
* @param m Mouse mode (defined in editing_syms.inc.h)
|
||||
* @param force Perform the effects of the change even if no change is required
|
||||
|
|
|
|||
|
|
@ -467,7 +467,6 @@ Editor::Editor ()
|
|||
|
||||
editor_regions_selection_changed_connection = selection->RegionsChanged.connect (sigc::mem_fun(*this, &Editor::region_selection_changed));
|
||||
|
||||
selection->PointsChanged.connect (sigc::mem_fun(*this, &Editor::point_selection_changed));
|
||||
selection->MarkersChanged.connect (sigc::mem_fun(*this, &Editor::marker_selection_changed));
|
||||
|
||||
edit_controls_vbox.set_spacing (0);
|
||||
|
|
|
|||
|
|
@ -2095,3 +2095,11 @@ Pianoroll::full_zoom_clicked()
|
|||
samplecnt_t s = dur.second.samples() - dur.first.samples();
|
||||
reposition_and_zoom (0, (s / (double) _visible_canvas_width));
|
||||
}
|
||||
|
||||
void
|
||||
Pianoroll::point_selection_changed ()
|
||||
{
|
||||
if (view) {
|
||||
view->point_selection_changed ();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,4 +269,6 @@ class Pianoroll : public CueEditor
|
|||
void build_zoom_focus_menu ();
|
||||
|
||||
std::pair<Temporal::timepos_t,Temporal::timepos_t> max_zoom_extent() const;
|
||||
|
||||
void point_selection_changed ();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -623,3 +623,11 @@ PianorollMidiView::automation_leave ()
|
|||
active_automation->line->track_entered ();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PianorollMidiView::point_selection_changed ()
|
||||
{
|
||||
if (active_automation) {
|
||||
active_automation->line->set_selected_points (_editing_context.get_selection().points);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@ class PianorollMidiView : public MidiView
|
|||
void automation_entry();
|
||||
void automation_leave ();
|
||||
|
||||
void point_selection_changed ();
|
||||
|
||||
sigc::signal<void> AutomationStateChange;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue