void begin_selection_op_history ();
void begin_reversible_selection_op (std::string cmd_name);
void commit_reversible_selection_op ();
- void undo_reversible_selection_op ();
- void redo_reversible_selection_op ();
+ void undo_selection_op ();
+ void redo_selection_op ();
void begin_reversible_command (std::string cmd_name);
void begin_reversible_command (GQuark);
void commit_reversible_command ();
alternate_redo_action = reg_sens (editor_actions, "alternate-redo", _("Redo"), sigc::bind (sigc::mem_fun(*this, &Editor::redo), 1U));
alternate_alternate_redo_action = reg_sens (editor_actions, "alternate-alternate-redo", _("Redo"), sigc::bind (sigc::mem_fun(*this, &Editor::redo), 1U));
- selection_undo_action = reg_sens (editor_actions, "undo-last-selection-op", _("Undo Last Selection Op"), sigc::mem_fun(*this, &Editor::undo_reversible_selection_op));
- selection_redo_action = reg_sens (editor_actions, "redo-last-selection-op", _("Redo Last Selection Op"), sigc::mem_fun(*this, &Editor::redo_reversible_selection_op));
+ selection_undo_action = reg_sens (editor_actions, "undo-last-selection-op", _("Undo Selection Change"), sigc::mem_fun(*this, &Editor::undo_selection_op));
+ selection_redo_action = reg_sens (editor_actions, "redo-last-selection-op", _("Redo Selection Change"), sigc::mem_fun(*this, &Editor::redo_selection_op));
reg_sens (editor_actions, "export-audio", _("Export Audio"), sigc::mem_fun(*this, &Editor::export_audio));
reg_sens (editor_actions, "export-range", _("Export Range"), sigc::mem_fun(*this, &Editor::export_range));
}
+ for (PointSelection::const_iterator i = points.begin(); i != points.end(); ++i) {
+ AutomationTimeAxisView* atv = dynamic_cast<AutomationTimeAxisView*> (&(*i)->line().trackview);
+ if (atv) {
+ XMLNode* r = node->add_child (X_("ControlPoint"));
+ r->add_property (X_("type"), "track");
+ r->add_property (X_("route-id"), atoi (atv->parent_route()->id ().to_s ().c_str()));
+ r->add_property (X_("automation-list-id"), atoi ((*i)->line().the_list()->id ().to_s ().c_str()));
+ r->add_property (X_("parameter"), EventTypeMap::instance().to_symbol ((*i)->line().the_list()->parameter ()));
+
+ snprintf(buf, sizeof(buf), "%d", (*i)->view_index());
+ r->add_property (X_("view-index"), string(buf));
+ }
+ }
+
for (TimeSelection::const_iterator i = time.begin(); i != time.end(); ++i) {
XMLNode* t = node->add_child (X_("AudioRange"));
snprintf(buf, sizeof(buf), "%" PRId64, (*i).start);
}
clear_regions ();
+ clear_points ();
clear_time ();
clear_tracks ();
clear_markers ();
regions.pending.push_back (id);
}
+ } else if ((*i)->name() == X_("ControlPoint")) {
+ XMLProperty* prop_type = (*i)->property (X_("type"));
+ XMLProperty* prop_route_id = (*i)->property (X_("route-id"));
+ XMLProperty* prop_alist_id = (*i)->property (X_("automation-list-id"));
+ XMLProperty* prop_parameter = (*i)->property (X_("parameter"));
+ XMLProperty* prop_view_index = (*i)->property (X_("view-index"));
+
+ assert (prop_type);
+ assert (prop_route_id);
+ assert (prop_alist_id);
+ assert (prop_parameter);
+ assert (prop_view_index);
+
+ if (prop_type->value () == "track") {
+ PBD::ID id (prop_route_id->value ());
+ RouteTimeAxisView* rtv = editor->get_route_view_by_route_id (id);
+
+ if (rtv) {
+ boost::shared_ptr<AutomationTimeAxisView> atv = rtv->automation_child (EventTypeMap::instance().from_symbol (prop_parameter->value ()));
+ if (atv) {
+ list<boost::shared_ptr<AutomationLine> > lines = atv->lines();
+ for (list<boost::shared_ptr<AutomationLine> > ::iterator i = lines.begin(); i != lines.end(); ++i) {
+ if ((*i)->the_list()->id() == prop_alist_id->value()) {
+ ControlPoint* cp = (*i)->nth(atol(prop_view_index->value().c_str()));
+ if (cp) {
+ add (cp);
+ }
+ }
+ }
+ }
+ }
+ }
+
} else if ((*i)->name() == X_("AudioRange")) {
XMLProperty* prop_start = (*i)->property (X_("start"));
XMLProperty* prop_end = (*i)->property (X_("end"));