mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Remove Timers to watch Controllable values
Depend on Changed() signals alone, which are usually much less frequent than rapid-timer events. As side-effect we now need to make the widgets insensitive when playing automation. Previously the user could not change the value because the Timer periodically reset it.
This commit is contained in:
parent
69ecb0db70
commit
5aecfc5acb
5 changed files with 47 additions and 30 deletions
|
|
@ -114,10 +114,13 @@ AutomationController::AutomationController(boost::shared_ptr<AutomationControl>
|
|||
_adjustment->signal_value_changed().connect(
|
||||
sigc::mem_fun(*this, &AutomationController::value_adjusted));
|
||||
|
||||
_screen_update_connection = Timers::rapid_connect (
|
||||
sigc::mem_fun (*this, &AutomationController::display_effective_value));
|
||||
ac->Changed.connect (_changed_connections, invalidator (*this), boost::bind (&AutomationController::display_effective_value, this), gui_context());
|
||||
display_effective_value ();
|
||||
|
||||
ac->Changed.connect (_changed_connection, invalidator (*this), boost::bind (&AutomationController::display_effective_value, this), gui_context());
|
||||
if (ac->alist ()) {
|
||||
ac->alist()->automation_state_changed.connect (_changed_connections, invalidator (*this), boost::bind (&AutomationController::automation_state_changed, this), gui_context());
|
||||
automation_state_changed ();
|
||||
}
|
||||
|
||||
add(*_widget);
|
||||
show_all();
|
||||
|
|
@ -148,7 +151,14 @@ AutomationController::create(const Evoral::Parameter& param,
|
|||
}
|
||||
|
||||
void
|
||||
AutomationController::display_effective_value()
|
||||
AutomationController::automation_state_changed ()
|
||||
{
|
||||
bool x = _controllable->alist()->automation_state() & Play;
|
||||
_widget->set_sensitive (!x);
|
||||
}
|
||||
|
||||
void
|
||||
AutomationController::display_effective_value ()
|
||||
{
|
||||
double const interface_value = _controllable->internal_to_interface(_controllable->get_value());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue