From 6aeb09062f4b4ff8e684f6f5ba80d47cb69665d5 Mon Sep 17 00:00:00 2001 From: Hans Fugal Date: Thu, 27 Jul 2006 00:19:27 +0000 Subject: [PATCH] r206@gandalf: fugalh | 2006-07-26 18:19:07 -0600 A couple more Command conversions. Now all that's left are the half dozen or so global mementos. git-svn-id: svn://localhost/ardour2/branches/undo@698 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/editor_markers.cc | 5 +++-- gtk2_ardour/region_gain_line.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index 0610b6aa9f..96504cd0f8 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -880,10 +880,11 @@ Editor::new_transport_marker_menu_set_loop () session->add_command (MementoCommand(*(session->locations()), before, after)); } else { - session->add_undo (retype_return(bind (mem_fun (*tll, &Location::set), tll->start(), tll->end()))); - session->add_redo (retype_return(bind (mem_fun (*tll, &Location::set), temp_location->start(), temp_location->end()))); + XMLNode &before = tll->get_state(); tll->set_hidden (false, this); tll->set (temp_location->start(), temp_location->end()); + XMLNode &after = tll->get_state(); + session->add_command (MementoCommand(*tll, before, after)); } commit_reversible_command (); diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index 526e8844ef..2faa63151b 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -81,8 +81,8 @@ void AudioRegionGainLine::end_drag (ControlPoint* cp) { if (!rv.region.envelope_active()) { - trackview.session().add_redo( bind( mem_fun(rv.region, &AudioRegion::set_envelope_active), true) ); rv.region.set_envelope_active(true); + trackview.session().add_command(MementoRedoCommand(rv.region, rv.region.get_state())); } AutomationLine::end_drag(cp); }