mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Use AxisView::get_gui_property API in AxisView class
This commit is contained in:
parent
9d2d0ddf00
commit
be59503364
1 changed files with 11 additions and 7 deletions
|
|
@ -98,19 +98,23 @@ AxisView::set_gui_property (const std::string& property_name, const std::string&
|
||||||
bool
|
bool
|
||||||
AxisView::marked_for_display () const
|
AxisView::marked_for_display () const
|
||||||
{
|
{
|
||||||
string const v = gui_property ("visible");
|
bool visible;
|
||||||
return (v == "" || PBD::string_is_affirmative (v));
|
if (!get_gui_property ("visible", visible)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
AxisView::set_marked_for_display (bool yn)
|
AxisView::set_marked_for_display (bool yn)
|
||||||
{
|
{
|
||||||
string const v = gui_property ("visible");
|
bool visible;
|
||||||
if (v == "" || yn != PBD::string_is_affirmative (v)) {
|
if (get_gui_property ("visible", visible) && visible == yn) {
|
||||||
|
return false; // nothing changed
|
||||||
|
}
|
||||||
|
|
||||||
set_gui_property ("visible", yn);
|
set_gui_property ("visible", yn);
|
||||||
return true; // things changed
|
return true; // things changed
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GUIObjectState&
|
GUIObjectState&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue