Fix crash on updating route IOs, and clean up confusing method names slightly.
git-svn-id: svn://localhost/ardour2/branches/3.0@8058 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3aa8ff4a5e
commit
b5fcd80ed6
|
@ -974,7 +974,7 @@ MixerStrip::connect_to_pan ()
|
||||||
pan_control->alist()->automation_style_changed.connect (panstyle_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_style_changed, &panners), gui_context());
|
pan_control->alist()->automation_style_changed.connect (panstyle_connection, invalidator (*this), boost::bind (&PannerUI::pan_automation_style_changed, &panners), gui_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
panners.pan_changed (this);
|
panners.panner_changed (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -150,13 +150,11 @@ PannerUI::set_panner (boost::shared_ptr<Panner> p)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_panner->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panner_changed, this), gui_context());
|
_panner->Changed.connect (connections, invalidator (*this), boost::bind (&PannerUI::panner_changed, this, this), gui_context());
|
||||||
_panner->LinkStateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_linkage, this), gui_context());
|
_panner->LinkStateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_linkage, this), gui_context());
|
||||||
_panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_state, this), gui_context());
|
_panner->StateChanged.connect (connections, invalidator (*this), boost::bind (&PannerUI::update_pan_state, this), gui_context());
|
||||||
|
|
||||||
setup_pan ();
|
panner_changed (0);
|
||||||
|
|
||||||
pan_changed (0);
|
|
||||||
update_pan_sensitive ();
|
update_pan_sensitive ();
|
||||||
update_pan_linkage ();
|
update_pan_linkage ();
|
||||||
pan_automation_state_changed ();
|
pan_automation_state_changed ();
|
||||||
|
@ -301,11 +299,47 @@ PannerUI::~PannerUI ()
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PannerUI::panner_changed ()
|
PannerUI::panner_changed (void* src)
|
||||||
{
|
{
|
||||||
ENSURE_GUI_THREAD (*this, &PannerUI::panner_changed)
|
ENSURE_GUI_THREAD (*this, &PannerUI::panner_changed)
|
||||||
|
|
||||||
setup_pan ();
|
setup_pan ();
|
||||||
pan_changed (0);
|
|
||||||
|
if (src == this) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (_panner->npanners()) {
|
||||||
|
case 0:
|
||||||
|
panning_link_direction_button.set_sensitive (false);
|
||||||
|
panning_link_button.set_sensitive (false);
|
||||||
|
return;
|
||||||
|
case 1:
|
||||||
|
panning_link_direction_button.set_sensitive (false);
|
||||||
|
panning_link_button.set_sensitive (false);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
panning_link_direction_button.set_sensitive (_panner->linked ());
|
||||||
|
panning_link_button.set_sensitive (true);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t const nouts = _panner->nouts();
|
||||||
|
|
||||||
|
switch (nouts) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
/* relax */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
/* bring pan bar state up to date */
|
||||||
|
update_pan_bars (false);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
// panner->move_puck (pan_value (pans[0], pans[1]), 0.5);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -590,46 +624,6 @@ PannerUI::effective_pan_display ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
PannerUI::pan_changed (void *src)
|
|
||||||
{
|
|
||||||
if (src == this) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (_panner->npanners()) {
|
|
||||||
case 0:
|
|
||||||
panning_link_direction_button.set_sensitive (false);
|
|
||||||
panning_link_button.set_sensitive (false);
|
|
||||||
return;
|
|
||||||
case 1:
|
|
||||||
panning_link_direction_button.set_sensitive (false);
|
|
||||||
panning_link_button.set_sensitive (false);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
panning_link_direction_button.set_sensitive (_panner->linked ());
|
|
||||||
panning_link_button.set_sensitive (true);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t const nouts = _panner->nouts();
|
|
||||||
|
|
||||||
switch (nouts) {
|
|
||||||
case 0:
|
|
||||||
case 1:
|
|
||||||
/* relax */
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
/* bring pan bar state up to date */
|
|
||||||
update_pan_bars (false);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
// panner->move_puck (pan_value (pans[0], pans[1]), 0.5);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PannerUI::pan_adjustment_changed (uint32_t which)
|
PannerUI::pan_adjustment_changed (uint32_t which)
|
||||||
{
|
{
|
||||||
|
|
|
@ -65,7 +65,7 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
|
|
||||||
virtual void set_panner (boost::shared_ptr<ARDOUR::Panner>);
|
virtual void set_panner (boost::shared_ptr<ARDOUR::Panner>);
|
||||||
|
|
||||||
void pan_changed (void *);
|
void panner_changed (void *);
|
||||||
|
|
||||||
void update_pan_sensitive ();
|
void update_pan_sensitive ();
|
||||||
void update_gain_sensitive ();
|
void update_gain_sensitive ();
|
||||||
|
@ -134,8 +134,6 @@ class PannerUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr
|
||||||
void build_astate_menu ();
|
void build_astate_menu ();
|
||||||
void build_astyle_menu ();
|
void build_astyle_menu ();
|
||||||
|
|
||||||
void panner_changed ();
|
|
||||||
|
|
||||||
void hide_pans ();
|
void hide_pans ();
|
||||||
|
|
||||||
void panner_moved (int which);
|
void panner_moved (int which);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user