Use AxisView::get_gui_property API in AxisView class

This commit is contained in:
Tim Mayberry 2016-08-30 22:33:00 +10:00
parent 9d2d0ddf00
commit be59503364

View File

@ -98,19 +98,23 @@ AxisView::set_gui_property (const std::string& property_name, const std::string&
bool
AxisView::marked_for_display () const
{
string const v = gui_property ("visible");
return (v == "" || PBD::string_is_affirmative (v));
bool visible;
if (!get_gui_property ("visible", visible)) {
return true;
}
return visible;
}
bool
AxisView::set_marked_for_display (bool yn)
{
string const v = gui_property ("visible");
if (v == "" || yn != PBD::string_is_affirmative (v)) {
set_gui_property ("visible", yn);
return true; // things changed
bool visible;
if (get_gui_property ("visible", visible) && visible == yn) {
return false; // nothing changed
}
return false;
set_gui_property ("visible", yn);
return true; // things changed
}
GUIObjectState&