summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-02-16 19:34:11 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-02-16 19:34:11 +0000
commit5f93192aa3a17cfa047f217e7798f50f52be15db (patch)
tree6c89578d36e434e9e051a0f04d32af8b1ebdd22a
parentfbbddf78c9441cc717d4294b07d95c1c998cfccd (diff)
fix crash when opening MIDI controller automation tracks, caused by addition of "owner" field to an AutomationController, used to print values. Renamed "owner" to "printer" and required it to be non-null
git-svn-id: svn://localhost/ardour2/branches/3.0@8874 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--gtk2_ardour/automation_controller.cc8
-rw-r--r--gtk2_ardour/automation_controller.h2
-rw-r--r--gtk2_ardour/midi_time_axis.cc4
-rw-r--r--gtk2_ardour/panner_ui.cc5
4 files changed, 14 insertions, 5 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index 75239f7f80..25887d8160 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -41,13 +41,15 @@
using namespace ARDOUR;
using namespace Gtk;
-AutomationController::AutomationController(boost::shared_ptr<Automatable> owner, boost::shared_ptr<AutomationControl> ac, Adjustment* adj)
+AutomationController::AutomationController(boost::shared_ptr<Automatable> printer, boost::shared_ptr<AutomationControl> ac, Adjustment* adj)
: BarController (*adj, ac)
, _ignore_change(false)
- , _owner (owner)
+ , _printer (printer)
, _controllable(ac)
, _adjustment(adj)
{
+ assert (_printer);
+
set_name (X_("PluginSlider")); // FIXME: get yer own name!
set_style (BarController::LeftToRight);
set_use_parent (true);
@@ -88,7 +90,7 @@ std::string
AutomationController::get_label (double& xpos)
{
xpos = 0.5;
- return _owner->value_as_string (_controllable);
+ return _printer->value_as_string (_controllable);
}
void
diff --git a/gtk2_ardour/automation_controller.h b/gtk2_ardour/automation_controller.h
index 67def61c35..7d925b6cd8 100644
--- a/gtk2_ardour/automation_controller.h
+++ b/gtk2_ardour/automation_controller.h
@@ -64,7 +64,7 @@ private:
void automation_state_changed();
bool _ignore_change;
- boost::shared_ptr<ARDOUR::Automatable> _owner;
+ boost::shared_ptr<ARDOUR::Automatable> _printer;
boost::shared_ptr<ARDOUR::AutomationControl> _controllable;
Gtk::Adjustment* _adjustment;
sigc::connection _screen_update_connection;
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 23d4adb104..3087f7be6b 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -846,7 +846,9 @@ MidiTimeAxisView::create_automation_child (const Evoral::Parameter& param, bool
assert (c);
boost::shared_ptr<AutomationTimeAxisView> track(new AutomationTimeAxisView (_session,
- _route, boost::shared_ptr<ARDOUR::Automatable>(), c,
+ _route,
+ _route,
+ c,
_editor,
*this,
true,
diff --git a/gtk2_ardour/panner_ui.cc b/gtk2_ardour/panner_ui.cc
index 49720d781e..4a3f98c3ff 100644
--- a/gtk2_ardour/panner_ui.cc
+++ b/gtk2_ardour/panner_ui.cc
@@ -223,9 +223,14 @@ PannerUI::setup_pan ()
if (!_panner) {
return;
}
+
uint32_t const nouts = _panner->out().n_audio();
uint32_t const nins = _panner->in().n_audio();
+ cerr << "GUI Panner for " << _panner << " setup with " << nins << " feeding " << nouts
+ << " current = " << _current_nins << " feeding " << _current_nouts
+ << endl;
+
if (int32_t (nouts) == _current_nouts && int32_t (nins) == _current_nins) {
return;
}