Avoid the use of dynamic_cast in TempoMap for performance improvement.
[ardour.git] / libs / ardour / presentation_info.cc
index e6200371c393cc4448747c7765fc31ea995e3372..fe094dae6bb667d5a41311b2d690fe2d9a66cb4a 100644 (file)
@@ -52,6 +52,7 @@ const PresentationInfo::Flag PresentationInfo::Bus = PresentationInfo::Flag (Pre
 const PresentationInfo::Flag PresentationInfo::Track = PresentationInfo::Flag (PresentationInfo::AudioTrack|PresentationInfo::MidiTrack);
 const PresentationInfo::Flag PresentationInfo::Route = PresentationInfo::Flag (PresentationInfo::Bus|PresentationInfo::Track);
 const PresentationInfo::Flag PresentationInfo::AllRoutes = PresentationInfo::Flag (PresentationInfo::Route|PresentationInfo::MasterOut|PresentationInfo::MonitorOut);
+const PresentationInfo::Flag PresentationInfo::AllStripables = PresentationInfo::Flag (PresentationInfo::AllRoutes|PresentationInfo::VCA);
 
 void
 PresentationInfo::make_property_quarks ()
@@ -127,7 +128,7 @@ PresentationInfo::set_state (XMLNode const& node, int /* version */)
        if ((prop = node.property (X_("color"))) != 0) {
                color_t c = atoi (prop->value());
                if (c != _color) {
-                       pc.add (Properties::order);
+                       pc.add (Properties::color);
                        _color = c;
                }
        }
@@ -166,6 +167,17 @@ 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)
 {