Fix 'sticky' sliders when MIDI control feedback is enabled.
git-svn-id: svn://localhost/ardour2/branches/3.0@4628 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
9cfa3e2bf6
commit
cbb59ddbce
@ -569,14 +569,14 @@ GainMeterBase::meter_point_clicked ()
|
||||
gint
|
||||
GainMeterBase::start_gain_touch (GdkEventButton* ev)
|
||||
{
|
||||
_io->gain_control()->alist()->start_touch ();
|
||||
_io->gain_control()->start_touch ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gint
|
||||
GainMeterBase::end_gain_touch (GdkEventButton* ev)
|
||||
{
|
||||
_io->gain_control()->alist()->stop_touch ();
|
||||
_io->gain_control()->stop_touch ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -65,10 +65,12 @@ public:
|
||||
}
|
||||
|
||||
inline void start_touch() {
|
||||
set_touching (true);
|
||||
return ((ARDOUR::AutomationList*)_list.get())->start_touch();
|
||||
}
|
||||
|
||||
inline void stop_touch() {
|
||||
set_touching (false);
|
||||
return ((ARDOUR::AutomationList*)_list.get())->stop_touch();
|
||||
}
|
||||
|
||||
|
@ -36,6 +36,7 @@ Controllable::Controllables Controllable::registry;
|
||||
|
||||
Controllable::Controllable (std::string name)
|
||||
: _name (name)
|
||||
, _touching (false)
|
||||
{
|
||||
if (registry_lock == 0) {
|
||||
registry_lock = new Glib::Mutex;
|
||||
|
@ -54,13 +54,17 @@ class Controllable : public PBD::StatefulDestructible {
|
||||
int set_state (const XMLNode&);
|
||||
XMLNode& get_state ();
|
||||
|
||||
std::string name() const { return _name; }
|
||||
std::string name() const { return _name; }
|
||||
bool touching () const { return _touching; }
|
||||
|
||||
void set_touching (bool yn) { _touching = yn; }
|
||||
|
||||
static Controllable* by_id (const PBD::ID&);
|
||||
static Controllable* by_name (const std::string&);
|
||||
|
||||
private:
|
||||
std::string _name;
|
||||
bool _touching;
|
||||
|
||||
void add ();
|
||||
void remove ();
|
||||
|
@ -182,6 +182,10 @@ MIDIControllable::midi_sense_note (Parser &p, EventTwoBytes *msg, bool is_on)
|
||||
void
|
||||
MIDIControllable::midi_sense_controller (Parser &, EventTwoBytes *msg)
|
||||
{
|
||||
if (controllable.touching()) {
|
||||
return; // to prevent feedback fights when e.g. dragging a UI slider
|
||||
}
|
||||
|
||||
if (control_additional == msg->controller_number) {
|
||||
if (!bistate) {
|
||||
controllable.set_value (midi_to_control(msg->value));
|
||||
|
Loading…
Reference in New Issue
Block a user