diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/presentation_info.h | 2 | ||||
-rw-r--r-- | libs/ardour/presentation_info.cc | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/ardour/presentation_info.h b/libs/ardour/ardour/presentation_info.h index 5ad33ab109..8a3c367448 100644 --- a/libs/ardour/ardour/presentation_info.h +++ b/libs/ardour/ardour/presentation_info.h @@ -145,6 +145,8 @@ class LIBARDOUR_API PresentationInfo : public PBD::Stateful order_t order() const { return _order; } color_t color() const { return _color; } + bool color_set() const; + void set_color (color_t); void set_selected (bool yn); void set_hidden (bool yn); diff --git a/libs/ardour/presentation_info.cc b/libs/ardour/presentation_info.cc index e6200371c3..cfed463d83 100644 --- a/libs/ardour/presentation_info.cc +++ b/libs/ardour/presentation_info.cc @@ -166,6 +166,18 @@ PresentationInfo::set_color (PresentationInfo::color_t c) } } +bool +PresentationInfo::color_set () const +{ + /* all RGBA values zero? not set. + * + * this is heuristic, but it is fairly realistic. who will ever set + * a color to completely transparent black? only the constructor .. + */ + + return _color == 0; +} + void PresentationInfo::set_selected (bool yn) { |