XMLNode &before = session->locations()->get_state();
session->locations()->add (location, true);
XMLNode &after = session->locations()->get_state();
- session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
session->commit_reversible_command ();
}
}
XMLNode &before = session->locations()->get_state();
session->locations()->remove (loc);
XMLNode &after = session->locations()->get_state();
- session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
session->commit_reversible_command ();
return FALSE;
}
loc->set_name (txt);
XMLNode &after = session->locations()->get_state();
- session->add_command (new MementoCommand<Locations>(*(session->locations()), before, after));
+ session->add_command (new MementoCommand<Locations>(*(session->locations()), &before, &after));
commit_reversible_command ();
}
session->locations()->add (loc, true);
session->set_auto_loop_location (loc);
XMLNode &after = session->locations()->get_state();
- session->add_command (new 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 (new MementoCommand<Location>(*tll, before, after));
+ session->add_command (new MementoCommand<Location>(*tll, &before, &after));
}
commit_reversible_command ();
session->locations()->add (tpl, true);
session->set_auto_punch_location (tpl);
XMLNode &after = session->locations()->get_state();
- session->add_command (new 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 (new MementoCommand<Location>(*tpl, before, after));
+ session->add_command (new MementoCommand<Location>(*tpl, &before, &after));
}
commit_reversible_command ();