13
0

Fix assertion failure when switching from a 2-channel to 1-channel route with the editor mixer open.

git-svn-id: svn://localhost/ardour2/branches/3.0@5785 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-10-14 23:47:44 +00:00
parent 39ad06f03b
commit 09efd82c6a
2 changed files with 6 additions and 5 deletions

View File

@ -52,6 +52,7 @@ const int PannerUI::pan_bar_height = 30;
PannerUI::PannerUI (Session& s)
: _session (s),
_current_nouts (-1),
_current_npans (-1),
hAdjustment(0.0, 0.0, 0.0),
vAdjustment(0.0, 0.0, 0.0),
panning_viewport(hAdjustment, vAdjustment),
@ -340,15 +341,15 @@ PannerUI::setup_pan ()
return;
}
uint32_t nouts = _panner->nouts();
uint32_t const nouts = _panner->nouts();
uint32_t const npans = _panner->npanners();
if (int32_t (nouts) == _current_nouts) {
if (int32_t (nouts) == _current_nouts && npans == _current_npans) {
return;
}
_current_nouts = nouts;
cout << "Setup pan for " << _panner->name() << endl;
_current_npans = npans;
if (nouts == 0 || nouts == 1) {
@ -369,7 +370,6 @@ PannerUI::setup_pan ()
} else if (nouts == 2) {
vector<Adjustment*>::size_type asz;
uint32_t npans = _panner->npanners();
while (!pan_adjustments.empty()) {
delete pan_bars.back();

View File

@ -84,6 +84,7 @@ class PannerUI : public Gtk::HBox
bool ignore_toggle;
bool in_pan_update;
int _current_nouts;
int _current_npans;
static const int pan_bar_height;