along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#include <ardour/curve.h>
#include <ardour/panner.h>
#include <gtkmm2ext/popup.h>
+#include <pbd/memento_command.h>
#include "pan_automation_time_axis.h"
#include "automation_line.h"
}
void
-PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
+PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, nframes_t when, double y)
{
if (lines.empty()) {
/* no data, possibly caused by no outputs/inputs */
AutomationList& alist (lines[line_index]->the_list());
_session.begin_reversible_command (_("add pan automation event"));
- _session.add_undo (alist.get_memento());
+ XMLNode &before = alist.get_state();
alist.add (when, y);
- _session.add_redo_no_execute (alist.get_memento());
+ XMLNode &after = alist.get_state();
+ _session.add_command(new MementoCommand<AutomationList>(alist, &before, &after));
_session.commit_reversible_command ();
_session.set_dirty ();
}
PanAutomationTimeAxisView::add_line (AutomationLine& line)
{
char buf[32];
- snprintf(buf,32,"Line %u",lines.size()+1);
+ snprintf(buf,32,"Line %zu",lines.size()+1);
multiline_selector.append_text(buf);
if (lines.empty()) {