summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authorHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
committerHans Fugal <hans@fugal.net>2006-07-29 03:17:11 +0000
commit1f1c4981de73b13d0b7617d8ebe89d9f22dddec3 (patch)
tree90ab3942960de1af673d8d2b4423f0b09dd839b4 /gtk2_ardour/editor_markers.cc
parent277b771a978b10580a46e19f19ae0cf2d8819f46 (diff)
Compiles, but doesn't link. The link errors are mostly expected and are
tomorrow's task. git-svn-id: svn://localhost/ardour2/branches/undo@719 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 96504cd0f8..c4d8f3143f 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -26,6 +26,7 @@
#include <gtkmm2ext/gtk_ui.h>
#include <ardour/location.h>
+#include <pbd/memento_command.h>
#include "editor.h"
#include "marker.h"
@@ -290,11 +291,10 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
if (session) {
Location *location = new Location (where, where, "mark", Location::IsMark);
session->begin_reversible_command (_("add marker"));
- XMLNode &before, &after;
- before = session->locations()->get_state();
+ XMLNode &before = session->locations()->get_state();
session->locations()->add (location, true);
- after = session->locations()->get_state();
- session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
+ XMLNode &after = session->locations()->get_state();
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
session->commit_reversible_command ();
}
}
@@ -331,11 +331,10 @@ gint
Editor::really_remove_marker (Location* loc)
{
session->begin_reversible_command (_("remove marker"));
- XMLNode &before, &after;
- before = session->locations()->get_state();
+ XMLNode &before = session->locations()->get_state();
session->locations()->remove (loc);
- after = session->locations()->get_state();
- session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
+ XMLNode &after = session->locations()->get_state();
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
session->commit_reversible_command ();
return FALSE;
}
@@ -848,7 +847,7 @@ Editor::marker_menu_rename ()
loc->set_name (txt);
XMLNode &after = session->locations()->get_state();
- session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
commit_reversible_command ();
}
@@ -877,14 +876,14 @@ Editor::new_transport_marker_menu_set_loop ()
session->locations()->add (loc, true);
session->set_auto_loop_location (loc);
XMLNode &after = session->locations()->get_state();
- session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
}
else {
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));
+ session->add_command (new MementoCommand<Location>(*tll, before, after));
}
commit_reversible_command ();
@@ -905,13 +904,13 @@ Editor::new_transport_marker_menu_set_punch ()
session->locations()->add (tpl, true);
session->set_auto_punch_location (tpl);
XMLNode &after = session->locations()->get_state();
- session->add_command (MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
} else {
XMLNode &before = tpl->get_state();
tpl->set_hidden(false, this);
tpl->set(temp_location->start(), temp_location->end());
XMLNode &after = tpl->get_state();
- session->add_command (MementoCommand<Location>(*tpl, before, after));
+ session->add_command (new MementoCommand<Location>(*tpl, before, after));
}
commit_reversible_command ();