Use XMLNode::get_property in AudioClock class
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "ardour_ui.h"
|
||||
#include "audio_clock.h"
|
||||
#include "enums_convert.h"
|
||||
#include "gui_thread.h"
|
||||
#include "keyboard.h"
|
||||
#include "tooltips.h"
|
||||
@@ -1191,20 +1192,20 @@ AudioClock::set_session (Session *s)
|
||||
_session->tempo_map().PropertyChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context());
|
||||
_session->tempo_map().MetricPositionChanged.connect (_session_connections, invalidator (*this), boost::bind (&AudioClock::session_property_changed, this, _1), gui_context());
|
||||
|
||||
XMLProperty const * prop;
|
||||
XMLNode* node = _session->extra_xml (X_("ClockModes"));
|
||||
AudioClock::Mode amode;
|
||||
|
||||
if (node) {
|
||||
for (XMLNodeList::const_iterator i = node->children().begin(); i != node->children().end(); ++i) {
|
||||
if ((prop = (*i)->property (X_("name"))) && prop->value() == _name) {
|
||||
std::string name;
|
||||
if ((*i)->get_property (X_("name"), name) && name == _name) {
|
||||
|
||||
if ((prop = (*i)->property (X_("mode"))) != 0) {
|
||||
amode = AudioClock::Mode (string_2_enum (prop->value(), amode));
|
||||
AudioClock::Mode amode;
|
||||
if ((*i)->get_property (X_("mode"), amode)) {
|
||||
set_mode (amode, true);
|
||||
}
|
||||
if ((prop = (*i)->property (X_("on"))) != 0) {
|
||||
set_off (!string_is_affirmative (prop->value()));
|
||||
bool on;
|
||||
if ((*i)->get_property (X_("on"), on)) {
|
||||
set_off (!on);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user