mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
Don't setup panner UI unless it has changed.
git-svn-id: svn://localhost/ardour2/branches/3.0@5606 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
95c4046ff9
commit
1aa38f074f
4 changed files with 12 additions and 7 deletions
|
|
@ -304,7 +304,6 @@ MixerStrip::init ()
|
||||||
set_flags (get_flags() | Gtk::CAN_FOCUS);
|
set_flags (get_flags() | Gtk::CAN_FOCUS);
|
||||||
|
|
||||||
SwitchIO.connect (mem_fun (*this, &MixerStrip::switch_io));
|
SwitchIO.connect (mem_fun (*this, &MixerStrip::switch_io));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MixerStrip::~MixerStrip ()
|
MixerStrip::~MixerStrip ()
|
||||||
|
|
|
||||||
|
|
@ -317,8 +317,6 @@ Mixer_UI::add_strip (RouteList& routes)
|
||||||
|
|
||||||
Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
|
Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
|
||||||
|
|
||||||
Config->get_default_narrow_ms() ? _strip_width = Narrow : _strip_width = Wide;
|
|
||||||
|
|
||||||
if (strip->width_owner() != strip) {
|
if (strip->width_owner() != strip) {
|
||||||
strip->set_width_enum (_strip_width, this);
|
strip->set_width_enum (_strip_width, this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ const int PannerUI::pan_bar_height = 30;
|
||||||
|
|
||||||
PannerUI::PannerUI (Session& s)
|
PannerUI::PannerUI (Session& s)
|
||||||
: _session (s),
|
: _session (s),
|
||||||
|
_current_nouts (-1),
|
||||||
hAdjustment(0.0, 0.0, 0.0),
|
hAdjustment(0.0, 0.0, 0.0),
|
||||||
vAdjustment(0.0, 0.0, 0.0),
|
vAdjustment(0.0, 0.0, 0.0),
|
||||||
panning_viewport(hAdjustment, vAdjustment),
|
panning_viewport(hAdjustment, vAdjustment),
|
||||||
|
|
@ -335,14 +336,20 @@ PannerUI::update_pan_state ()
|
||||||
void
|
void
|
||||||
PannerUI::setup_pan ()
|
PannerUI::setup_pan ()
|
||||||
{
|
{
|
||||||
cerr << "Setup pan for " << _panner->name() << endl;
|
|
||||||
|
|
||||||
if (!_panner) {
|
if (!_panner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t nouts = _panner->nouts();
|
uint32_t nouts = _panner->nouts();
|
||||||
|
|
||||||
|
if (nouts == _current_nouts) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_current_nouts = nouts;
|
||||||
|
|
||||||
|
cout << "Setup pan for " << _panner->name() << endl;
|
||||||
|
|
||||||
if (nouts == 0 || nouts == 1) {
|
if (nouts == 0 || nouts == 1) {
|
||||||
|
|
||||||
while (!pan_adjustments.empty()) {
|
while (!pan_adjustments.empty()) {
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ class PannerUI : public Gtk::HBox
|
||||||
|
|
||||||
bool ignore_toggle;
|
bool ignore_toggle;
|
||||||
bool in_pan_update;
|
bool in_pan_update;
|
||||||
|
int _current_nouts;
|
||||||
|
|
||||||
static const int pan_bar_height;
|
static const int pan_bar_height;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue