- id().print (buf, sizeof (buf));
- node->add_property("id", buf);
- node->add_property ("name", name());
- snprintf (buf, sizeof (buf), "%" PRId64, start());
- node->add_property ("start", buf);
- snprintf (buf, sizeof (buf), "%" PRId64, end());
- node->add_property ("end", buf);
- node->add_property ("flags", enum_2_string (_flags));
- node->add_property ("locked", (_locked ? "yes" : "no"));
- node->add_property ("position-lock-style", enum_2_string (_position_lock_style));
+ node->set_property ("id", id ());
+ node->set_property ("name", name());
+ node->set_property ("start", start());
+ node->set_property ("end", end());
+ if (position_lock_style() == MusicTime) {
+ node->set_property ("start-beat", _start_beat);
+ node->set_property ("end-beat", _end_beat);
+ }
+ node->set_property ("flags", _flags);
+ node->set_property ("locked", _locked);
+ node->set_property ("position-lock-style", _position_lock_style);