session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
}
else {
- session->add_undo (retype_return<void>(bind (mem_fun (*tll, &Location::set), tll->start(), tll->end())));
- session->add_redo (retype_return<void>(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<Location>(*tll, before, after));
}
commit_reversible_command ();
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<AudioRegion>(rv.region, rv.region.get_state()));
}
AutomationLine::end_drag(cp);
}