Fix crash when going from >2 outputs (2D panner) to <= 2 outputs.

git-svn-id: svn://localhost/ardour2/branches/3.0@6380 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2009-12-22 01:09:50 +00:00
parent f450df300c
commit 06f094d4b6
3 changed files with 9 additions and 5 deletions

View File

@ -358,6 +358,9 @@ PannerUI::setup_pan ()
pan_adjustments.pop_back ();
}
delete panner;
panner = 0;
/* stick something into the panning viewport so that it redraws */
EventBox* eb = manage (new EventBox());
@ -376,6 +379,9 @@ PannerUI::setup_pan ()
pan_adjustments.pop_back ();
}
delete panner;
panner = 0;
while ((asz = pan_adjustments.size()) < npans) {
float x, rx;
@ -447,8 +453,8 @@ PannerUI::setup_pan ()
panner->set_name ("MixerPanZone");
panner->show ();
panner->signal_button_press_event().connect
(sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) 0), false);
panner->signal_button_press_event().connect
(sigc::bind (sigc::mem_fun(*this, &PannerUI::pan_button_event), (uint32_t) 0), false);
}
update_pan_sensitive ();

View File

@ -91,7 +91,7 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
static const int pan_bar_height;
Panner2d* panner;
Panner2d* panner; ///< 2D panner, or 0
Panner2dWindow* big_window;
Gtk::VBox pan_bar_packer;

View File

@ -894,8 +894,6 @@ Panner::reset (uint32_t nouts, uint32_t npans)
bool changed = false;
bool do_not_and_did_not_need_panning = ((nouts < 2) && (outputs.size() < 2));
//cout << "Reset panner for " << nouts << " " << npans << "\n";
/* if new and old config don't need panning, or if
the config hasn't changed, we're done.
*/