diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2016-08-30 22:31:25 +1000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2017-04-19 09:36:56 +1000 |
commit | 5b71470449ca55955ee96d141af17fd5ba9dd823 (patch) | |
tree | b6fa036054cf99015bed058eb1bc7de01bad8dfb /gtk2_ardour/automation_time_axis.cc | |
parent | 8d90723e8c66c9cbfab147746f9611d887aaf05c (diff) |
Use XMLNode::get_property API in AutomationTimeAxis class
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 2634b87891..778c57cdba 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -828,13 +828,13 @@ int AutomationTimeAxisView::set_state_2X (const XMLNode& node, int /*version*/) { if (node.name() == X_("gain") && _parameter == Evoral::Parameter (GainAutomation)) { - XMLProperty const * shown = node.property (X_("shown")); - if (shown) { - bool yn = string_is_affirmative (shown->value ()); - if (yn) { + + bool shown; + if (node.get_property (X_("shown"), shown)) { + if (shown) { _canvas_display->show (); /* FIXME: necessary? show_at? */ + set_gui_property ("visible", shown); } - set_gui_property ("visible", yn); } else { set_gui_property ("visible", false); } @@ -869,11 +869,9 @@ AutomationTimeAxisView::what_has_visible_automation (const boost::shared_ptr<Aut const XMLNode* gui_node = ac->extra_xml ("GUI"); if (gui_node) { - XMLProperty const * prop = gui_node->property ("shown"); - if (prop) { - if (string_is_affirmative (prop->value())) { - visible.insert (i->first); - } + bool shown; + if (gui_node->get_property ("shown", shown) && shown) { + visible.insert (i->first); } } } |