Fix patch-change bank update loop
authorRobin Gareus <robin@gareus.org>
Wed, 17 Jul 2019 14:36:01 +0000 (16:36 +0200)
committerRobin Gareus <robin@gareus.org>
Wed, 17 Jul 2019 15:30:50 +0000 (17:30 +0200)
Without an object, the Unwinder has no scope and the "ignore" variable
is never set.

In this case: When the patch-bank was changed externally this
lead to a duplicate recursive call to "refill_banks".

gtk2_ardour/patch_change_widget.cc

index f9c88d80688af5845799a1204200d4c105fab932..de20c30bc56287fa701f869e539d04fb982bdabc 100644 (file)
@@ -229,7 +229,7 @@ PatchChangeWidget::refill_banks ()
        const int b = bank (_channel);
 
        {
-               PBD::Unwinder<bool> (_ignore_spin_btn_signals, true);
+               PBD::Unwinder<bool> uw (_ignore_spin_btn_signals, true);
                _bank_msb_spin.set_value (b >> 7);
                _bank_lsb_spin.set_value (b & 127);
        }