From 9af9e17adc96f7c27ce0e1651d6949393e787636 Mon Sep 17 00:00:00 2001 From: nick_m Date: Mon, 15 Dec 2014 00:13:38 +1100 Subject: Add editor selection state to session history via a SelectionMemento, which combines selection related editor properties with the current editor selection. The related editor properties are: mouse mode, zoom setting, left frame of the canvas, y origin of the canvas. Selection state now includes region views (storing the underlying region id) and time. This patch also fixes a region mute undo bug. --- gtk2_ardour/automation_line.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gtk2_ardour/automation_line.cc') diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index 62c9118ef4..c0ed14f7f9 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -283,7 +283,7 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y) double const x = trackview.editor().sample_to_pixel_unrounded (_time_converter->to((*cp.model())->when) - _offset); - trackview.editor().session()->begin_reversible_command (_("automation event move")); + trackview.editor().begin_reversible_command (_("automation event move")); trackview.editor().session()->add_command ( new MementoCommand (memento_command_binder(), &get_state(), 0)); @@ -304,7 +304,7 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y) trackview.editor().session()->add_command ( new MementoCommand (memento_command_binder(), 0, &alist->get_state())); - trackview.editor().session()->commit_reversible_command (); + trackview.editor().commit_reversible_command (); trackview.editor().session()->set_dirty (); } @@ -456,7 +456,7 @@ AutomationLine::string_to_fraction (string const & s) const void AutomationLine::start_drag_single (ControlPoint* cp, double x, float fraction) { - trackview.editor().session()->begin_reversible_command (_("automation event move")); + trackview.editor().begin_reversible_command (_("automation event move")); trackview.editor().session()->add_command ( new MementoCommand (memento_command_binder(), &get_state(), 0)); @@ -482,7 +482,7 @@ AutomationLine::start_drag_single (ControlPoint* cp, double x, float fraction) void AutomationLine::start_drag_line (uint32_t i1, uint32_t i2, float fraction) { - trackview.editor().session()->begin_reversible_command (_("automation range move")); + trackview.editor().begin_reversible_command (_("automation range move")); trackview.editor().session()->add_command ( new MementoCommand (memento_command_binder (), &get_state(), 0)); @@ -502,7 +502,7 @@ AutomationLine::start_drag_line (uint32_t i1, uint32_t i2, float fraction) void AutomationLine::start_drag_multiple (list cp, float fraction, XMLNode* state) { - trackview.editor().session()->begin_reversible_command (_("automation range move")); + trackview.editor().begin_reversible_command (_("automation range move")); trackview.editor().session()->add_command ( new MementoCommand (memento_command_binder(), state, 0)); @@ -857,7 +857,7 @@ AutomationLine::is_first_point (ControlPoint& cp) void AutomationLine::remove_point (ControlPoint& cp) { - trackview.editor().session()->begin_reversible_command (_("remove control point")); + trackview.editor().begin_reversible_command (_("remove control point")); XMLNode &before = alist->get_state(); alist->erase (cp.model()); @@ -865,7 +865,7 @@ AutomationLine::remove_point (ControlPoint& cp) trackview.editor().session()->add_command( new MementoCommand (memento_command_binder (), &before, &alist->get_state())); - trackview.editor().session()->commit_reversible_command (); + trackview.editor().commit_reversible_command (); trackview.editor().session()->set_dirty (); } -- cgit v1.2.3