summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-11-15 03:48:20 +1100
committernick_m <mainsbridge@gmail.com>2016-11-15 03:48:20 +1100
commit0b2ae7dad991e1fc8b88462c3cd145c1d3663392 (patch)
treec01f5efc49252ddcd62c69d10da419b33a1dbd62 /gtk2_ardour
parent63f86b13145f466c22688ae36254bd460cf77855 (diff)
change note selection node name - should fix 7110
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/selection.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/gtk2_ardour/selection.cc b/gtk2_ardour/selection.cc
index 5c93fd62c8..2b496fb833 100644
--- a/gtk2_ardour/selection.cc
+++ b/gtk2_ardour/selection.cc
@@ -1273,19 +1273,18 @@ Selection::get_state () const
XMLNode* n = NULL;
list<pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > > rid_notes;
editor->get_per_region_note_selection (rid_notes);
- if (!rid_notes.empty()) {
- n = node->add_child (X_("MIDINote"));
- }
+
list<pair<PBD::ID, std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > > > >::iterator rn_it;
for (rn_it = rid_notes.begin(); rn_it != rid_notes.end(); ++rn_it) {
assert(n); // hint for clang static analysis
- n->add_property (X_("region_id"), atoi((*rn_it).first.to_s().c_str()));
+ n = node->add_child (X_("MIDINotes"));
+ n->add_property (X_("region-id"), atoi((*rn_it).first.to_s().c_str()));
for (std::set<boost::shared_ptr<Evoral::Note<Evoral::Beats> > >::iterator i = (*rn_it).second.begin(); i != (*rn_it).second.end(); ++i) {
XMLNode* nc = n->add_child(X_("note"));
snprintf(buf, sizeof(buf), "%d", (*i)->id());
- nc->add_property(X_("id"), string(buf));
+ nc->add_property (X_("note-id"), string(buf));
}
}
@@ -1380,7 +1379,7 @@ Selection::set_state (XMLNode const & node, int)
regions.pending.push_back (id);
}
- } else if ((*i)->name() == X_("MIDINote")) {
+ } else if ((*i)->name() == X_("MIDINotes")) {
XMLProperty const * prop_region_id = (*i)->property (X_("region-id"));
assert (prop_region_id);
@@ -1394,9 +1393,9 @@ Selection::set_state (XMLNode const & node, int)
XMLNodeList children = (*i)->children ();
for (XMLNodeList::const_iterator ci = children.begin(); ci != children.end(); ++ci) {
- XMLProperty const* prop_id = (*ci)->property (X_("id"));
+ XMLProperty const * prop_id = (*ci)->property (X_("note-id"));
if (prop_id) {
- Evoral::event_id_t id = atoi (prop_id->value ());
+ Evoral::event_id_t id = atoi(prop_id->value());
notes.push_back (id);
}
}