diff options
author | David Robillard <d@drobilla.net> | 2006-08-24 07:37:17 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-08-24 07:37:17 +0000 |
commit | 25d1670a61d19e795227b939a98be9cf5a050c67 (patch) | |
tree | f288677bdbc2a2ff85763e59e5a9f801ca8f8489 /gtk2_ardour/automation_line.cc | |
parent | ea71de278461b2bc0240515b82bb56ef68f5eee3 (diff) |
Merged with trunk R846
Removed some overly verbose debug printing
git-svn-id: svn://localhost/ardour2/branches/midi@847 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r-- | gtk2_ardour/automation_line.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index f3e30c4523..c0ba957af8 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -244,6 +244,9 @@ AutomationLine::AutomationLine (const string & name, TimeAxisView& tv, ArdourCan line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler)); alist.StateChanged.connect (mem_fun(*this, &AutomationLine::list_changed)); + + trackview.session().register_with_memento_command_factory(_id, this); + } AutomationLine::~AutomationLine () @@ -888,7 +891,7 @@ AutomationLine::start_drag (ControlPoint* cp, float fraction) } trackview.editor.current_session()->begin_reversible_command (str); - trackview.editor.current_session()->add_command (new MementoUndoCommand<AutomationLine>(*this, get_state())); + trackview.editor.current_session()->add_command (new MementoCommand<AutomationLine>(*this, &get_state(), 0)); first_drag_fraction = fraction; last_drag_fraction = fraction; @@ -937,7 +940,7 @@ AutomationLine::end_drag (ControlPoint* cp) update_pending = false; - trackview.editor.current_session()->add_command (new MementoRedoCommand<AutomationLine>(*this, get_state())); + trackview.editor.current_session()->add_command (new MementoCommand<AutomationLine>(*this, 0, &get_state())); trackview.editor.current_session()->commit_reversible_command (); trackview.editor.current_session()->set_dirty (); } @@ -1018,7 +1021,7 @@ AutomationLine::remove_point (ControlPoint& cp) alist.erase (mr.start, mr.end); - trackview.editor.current_session()->add_command(new MementoCommand<AutomationLine>(*this, before, get_state())); + trackview.editor.current_session()->add_command(new MementoCommand<AutomationLine>(*this, &before, &get_state())); trackview.editor.current_session()->commit_reversible_command (); trackview.editor.current_session()->set_dirty (); } @@ -1228,7 +1231,7 @@ AutomationLine::clear () /* parent must create command */ XMLNode &before = get_state(); alist.clear(); - trackview.editor.current_session()->add_command (new MementoCommand<AutomationLine>(*this, before, get_state())); + trackview.editor.current_session()->add_command (new MementoCommand<AutomationLine>(*this, &before, &get_state())); trackview.editor.current_session()->commit_reversible_command (); trackview.editor.current_session()->set_dirty (); } |