kbd automation: no popup immediately after add, 2nd Return/Enter for that
Also, two different bindings for adding a point with and without guard points.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<Bindings name="Automation">
|
||||
<Press>
|
||||
<Binding key="Return" action="Automation/create-point"/>
|
||||
<Binding key="Secondary-Return" action="Automation/create-point-with-guards"/>
|
||||
<Binding key="Right" action="Automation/move-points-later"/>
|
||||
<Binding key="Left" action="Automation/move-points-earlier"/>
|
||||
<Binding key="Up" action="Automation/raise-points"/>
|
||||
|
||||
@@ -1789,7 +1789,7 @@ AutomationLine::add (std::shared_ptr<AutomationControl> control, GdkEvent* event
|
||||
std::list<Selectable*> results;
|
||||
|
||||
if (from_kbd) {
|
||||
entry_required_post_add = true;
|
||||
entry_required_post_add = false;
|
||||
}
|
||||
|
||||
if (alist->editor_add (when, y, with_guard_points)) {
|
||||
|
||||
@@ -363,7 +363,8 @@ EditingContext::register_automation_actions (Bindings* automation_bindings, std:
|
||||
|
||||
_automation_actions = ActionManager::create_action_group (automation_bindings, prefix + X_("Automation"));
|
||||
|
||||
reg_sens (_automation_actions, "create-point", _("Create Automation Point"), sigc::mem_fun (*this, &EditingContext::automation_create_point_at_edit_point));
|
||||
reg_sens (_automation_actions, "create-point", _("Create Automation Point"), std::bind (sigc::mem_fun (*this, &EditingContext::automation_create_point_at_edit_point), false));
|
||||
reg_sens (_automation_actions, "create-point-with-guards", _("Create Automation Point"), std::bind (sigc::mem_fun (*this, &EditingContext::automation_create_point_at_edit_point), true));
|
||||
reg_sens (_automation_actions, "move-points-later", _("Create Automation P (at Playhead)"), sigc::mem_fun (*this, &EditingContext::automation_move_points_later));
|
||||
reg_sens (_automation_actions, "move-points-earlier", _("Create Automation Point (at Playhead)"), sigc::mem_fun (*this, &EditingContext::automation_move_points_earlier));
|
||||
reg_sens (_automation_actions, "raise-points", _("Create Automation Point (at Playhead)"), sigc::mem_fun (*this, &EditingContext::automation_raise_points));
|
||||
|
||||
@@ -809,7 +809,7 @@ class EditingContext : public ARDOUR::SessionHandlePtr, public AxisViewProvider,
|
||||
|
||||
void center_screen_internal (samplepos_t, float);
|
||||
|
||||
virtual void automation_create_point_at_edit_point() {}
|
||||
virtual void automation_create_point_at_edit_point(bool with_guard_points) {}
|
||||
virtual void automation_raise_points () {}
|
||||
virtual void automation_lower_points () {};
|
||||
virtual void automation_move_points_later () {};
|
||||
|
||||
@@ -1594,7 +1594,7 @@ private:
|
||||
|
||||
protected:
|
||||
void _commit_tempo_map_edit (Temporal::TempoMap::WritableSharedPtr&, bool with_update = false);
|
||||
void automation_create_point_at_edit_point();
|
||||
void automation_create_point_at_edit_point (bool with_guard_points);
|
||||
void automation_raise_points ();
|
||||
void automation_lower_points ();
|
||||
void automation_move_points_later ();
|
||||
|
||||
@@ -1333,7 +1333,7 @@ Editor::register_region_actions ()
|
||||
}
|
||||
|
||||
void
|
||||
Editor::automation_create_point_at_edit_point ()
|
||||
Editor::automation_create_point_at_edit_point (bool with_guard_points)
|
||||
{
|
||||
AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (entered_track);
|
||||
if (!atv) {
|
||||
@@ -1347,7 +1347,12 @@ Editor::automation_create_point_at_edit_point ()
|
||||
event.button.button = 1;
|
||||
event.button.state = 0;
|
||||
|
||||
atv->line()->add (atv->control(), &event, where, atv->line()->the_list()->eval (where), true, true);
|
||||
if (atv->line()->the_list()->has_event_at (where)) {
|
||||
atv->line()->begin_edit();
|
||||
} else {
|
||||
atv->line()->add (atv->control(), &event, where, atv->line()->the_list()->eval (where), with_guard_points, true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user