make send GUIs into ArdourDialogs; ensure that panner changes propagate into the...
[ardour.git] / libs / ardour / panner.cc
index db802b0921fce4a79645db313ec6fb4ae47712a1..4848f559cc8d4315a96fdc30a32fb024ecceabf5 100644 (file)
@@ -806,8 +806,14 @@ Panner::reset (uint32_t nouts, uint32_t npans)
 {
        uint32_t n;
        bool changed = false;
+       bool do_not_and_did_not_need_panning = ((nouts < 2) && (outputs.size() < 2));
 
-       if (nouts < 2 || (nouts == outputs.size() && npans == size())) {
+       /* if new and old config don't need panning, or if 
+          the config hasn't changed, we're done.
+       */
+
+       if (do_not_and_did_not_need_panning || 
+           ((nouts == outputs.size()) && (npans == size()))) {
                return;
        } 
 
@@ -825,6 +831,10 @@ Panner::reset (uint32_t nouts, uint32_t npans)
                changed = true;
        }
 
+       if (nouts < 2) {
+               goto send_changed;
+       }
+
        switch (nouts) {
        case 0:
                break;
@@ -926,6 +936,7 @@ Panner::reset (uint32_t nouts, uint32_t npans)
                }
        }
 
+  send_changed:
        if (changed) {
                Changed (); /* EMIT SIGNAL */
        }