FP8: "Link" mode works with AutomationControl only.
authorRobin Gareus <robin@gareus.org>
Mon, 3 Jul 2017 17:56:16 +0000 (19:56 +0200)
committerRobin Gareus <robin@gareus.org>
Mon, 3 Jul 2017 17:56:16 +0000 (19:56 +0200)
libs/surfaces/faderport8/callbacks.cc

index ebd6869b8e7e30d6093f88261a6963f640261e7d..d6f12150b4441cead62c5e7529dc447aeac97fa4 100644 (file)
@@ -227,7 +227,7 @@ FaderPort8::nofity_focus_control (boost::weak_ptr<PBD::Controllable> c)
        // TODO consider subscribing to c's DropReferences
        // (in case the control goes away while it has focus, update the BtnColor)
        _link_control = c;
        // TODO consider subscribing to c's DropReferences
        // (in case the control goes away while it has focus, update the BtnColor)
        _link_control = c;
-       if (c.expired ()) {
+       if (c.expired () || 0 == boost::dynamic_pointer_cast<AutomationControl> (_link_control.lock ())) {
                _ctrls.button (FP8Controls::BtnLink).set_color (0xff8800ff);
                _ctrls.button (FP8Controls::BtnLock).set_color (0xff0000ff);
        } else {
                _ctrls.button (FP8Controls::BtnLink).set_color (0xff8800ff);
                _ctrls.button (FP8Controls::BtnLock).set_color (0xff0000ff);
        } else {