[Summary] Fixed race condition: "should_do_transport_work" must not be dropped to...
[ardour.git] / libs / ardour / midi_scene_change.cc
index db903c21ebe5628f3a8060d2465732ca47888ec8..5e9394d2dbe3453b21c4c8b67fb497bcb671b95a 100644 (file)
 using namespace PBD;
 using namespace ARDOUR;
 
-const uint32_t MIDISceneChange::out_of_bound_color = 0x00000000; /* note: zero alpha means invisible, which acts as out-of-bound signal */
-
 MIDISceneChange::MIDISceneChange (int c, int b, int p)
        : _bank (b)
        , _program (p)
        , _channel (c & 0xf)
-        , _color (out_of_bound_color)
 {
        if (_bank > 16384) {
                _bank = -1;
@@ -49,7 +46,6 @@ MIDISceneChange::MIDISceneChange (const XMLNode& node, int version)
        : _bank (-1)
        , _program (-1)
        , _channel (-1)
-        , _color (out_of_bound_color)
 {
        set_state (node, version);
 }
@@ -145,10 +141,10 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */)
        _channel = atoi (prop->value());
 
        if ((prop = node.property (X_("color"))) != 0) {
-                _color = atoi (prop->value());
-        } else {
-                _color = out_of_bound_color;
-        }
+               _color = atoi (prop->value());
+       } else {
+               _color = out_of_bound_color;
+       }
 
        return 0;
 }
@@ -156,20 +152,7 @@ MIDISceneChange::set_state (const XMLNode& node, int /* version-ignored */)
 bool
 MIDISceneChange::operator==(const MIDISceneChange& other) const
 {
-        return _program == other._program &&
-                _bank == other._bank &&
-                _channel == other._channel;
-}
-
-void
-MIDISceneChange::set_color (uint32_t c) 
-{
-        _color = c;
-        ColorChanged (); /* EMIT SIGNAL */
-}
-
-uint32_t
-MIDISceneChange::color() const
-{
-        return _color;
+       return _program == other._program &&
+               _bank == other._bank &&
+               _channel == other._channel;
 }