projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
63f86b1
)
change note selection node name - should fix 7110
author
nick_m
<mainsbridge@gmail.com>
Mon, 14 Nov 2016 16:48:20 +0000
(
03:48
+1100)
committer
nick_m
<mainsbridge@gmail.com>
Mon, 14 Nov 2016 16:48:20 +0000
(
03:48
+1100)
gtk2_ardour/selection.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/selection.cc
b/gtk2_ardour/selection.cc
index 5c93fd62c866f2ca3f07b7420cfb9f636872cba9..2b496fb8332e38d2baac2bd347037d4d8f21b75f 100644
(file)
--- 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);
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
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());
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);
}
regions.pending.push_back (id);
}
- } else if ((*i)->name() == X_("MIDINote")) {
+ } else if ((*i)->name() == X_("MIDINote
s
")) {
XMLProperty const * prop_region_id = (*i)->property (X_("region-id"));
assert (prop_region_id);
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) {
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) {
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);
}
}
notes.push_back (id);
}
}