projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d90723
)
Use XMLNode::get_property API in AutomationTimeAxis class
author
Tim Mayberry
<mojofunk@gmail.com>
Tue, 30 Aug 2016 12:31:25 +0000
(22:31 +1000)
committer
Tim Mayberry
<mojofunk@gmail.com>
Tue, 18 Apr 2017 23:36:56 +0000
(09:36 +1000)
gtk2_ardour/automation_time_axis.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/automation_time_axis.cc
b/gtk2_ardour/automation_time_axis.cc
index 2634b878919617baa4d043c67d525444a1d1f3ab..778c57cdba8b7358c5261e6a3beccae84b254af9 100644
(file)
--- 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)) {
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 (
y
n) {
+
+ bool shown;
+ if (node.get_property (X_("shown"), shown)) {
+ if (
show
n) {
_canvas_display->show (); /* FIXME: necessary? show_at? */
_canvas_display->show (); /* FIXME: necessary? show_at? */
+ set_gui_property ("visible", shown);
}
}
- set_gui_property ("visible", yn);
} else {
set_gui_property ("visible", false);
}
} 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) {
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);
}
}
}
}
}
}