Only flip if not already in desired state. Fixes fader jerk on banking.
authorLen Ovens <len@ovenwerks.net>
Mon, 12 Oct 2015 20:52:10 +0000 (13:52 -0700)
committerLen Ovens <len@ovenwerks.net>
Mon, 12 Oct 2015 20:52:10 +0000 (13:52 -0700)
libs/surfaces/mackie/mackie_control_protocol.cc

index 9f9f33b633d484d3690335b5f9cba0f4e58d9c67..9f98f1d05b807786de7ec4fa324b9a32e7f8df9d 100644 (file)
@@ -1522,12 +1522,20 @@ MackieControlProtocol::set_view_mode (ViewMode m)
 void
 MackieControlProtocol::set_flip_mode (FlipMode fm)
 {
-       Glib::Threads::Mutex::Lock lm (surfaces_lock);
+       if (_flip_mode != fm) {
+               if (fm == Normal) {
+                       update_global_button (Button::Flip, off);
+               } else {
+                       update_global_button (Button::Flip, on);
+               }
+
+               Glib::Threads::Mutex::Lock lm (surfaces_lock);
 
-       _flip_mode = fm;
+               _flip_mode = fm;
 
-       for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
-               (*s)->update_flip_mode_display ();
+               for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
+                       (*s)->update_flip_mode_display ();
+               }
        }
 }