#include "ardour/automation_control.h"
#include "ardour/event_type_map.h"
#include "ardour/automatable.h"
+#include "ardour/panner.h"
#include "ardour_ui.h"
#include "utils.h"
#include "automation_controller.h"
_screen_update_connection = ARDOUR_UI::RapidScreenUpdate.connect (
sigc::mem_fun (*this, &AutomationController::display_effective_value));
- ac->Changed.connect (sigc::mem_fun(*this, &AutomationController::value_changed));
+ ac->Changed.connect (_changed_connection, invalidator (*this), boost::bind (&AutomationController::value_changed, this), gui_context());
}
AutomationController::~AutomationController()
// Hack to display CC rounded to int
if (_controllable->parameter().type() == MidiCCAutomation) {
s << (int)_controllable->get_value();
+ } else if (_controllable->parameter().type() == PanAutomation) {
+ s << Panner::value_as_string (_controllable->get_value ());
} else {
s << std::fixed << std::setprecision(3) << _controllable->get_value();
}
void
AutomationController::value_changed ()
{
- Gtkmm2ext::UI::instance()->call_slot (boost::bind (&AutomationController::display_effective_value, this));
+ Gtkmm2ext::UI::instance()->call_slot (invalidator (*this), boost::bind (&AutomationController::display_effective_value, this));
}
+/** Stop updating our value from our controllable */
+void
+AutomationController::stop_updating ()
+{
+ _screen_update_connection.disconnect ();
+}