summaryrefslogtreecommitdiff
path: root/libs/ardour/presentation_info.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-06-09 16:24:22 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-06-09 16:24:22 -0400
commit624715cca7e96d94d04c35927325a8212454907d (patch)
treeff110da20c179e1a8ac5fa64e766ebce0d4d40bb /libs/ardour/presentation_info.cc
parenta74c850b5bee94e67c1c602dbfeb92ec3b82dcc2 (diff)
provide a heuristic to decide if the color has been set for a PresentationInfo object
Diffstat (limited to 'libs/ardour/presentation_info.cc')
-rw-r--r--libs/ardour/presentation_info.cc12
1 files changed, 12 insertions, 0 deletions
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)
{