diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-06 20:58:07 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-07-06 20:58:33 -0400 |
commit | 77a8da9010320469d184a9e7e36957f9cb8880a5 (patch) | |
tree | 4f50a166694bfed96acdf252a064d90384fcf6a9 /libs | |
parent | 6911702f21494ef67252e3706cdc079c26852257 (diff) |
set ControlProtocol::_first_selected_stripable at the right time only
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaces/control_protocol/control_protocol.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/surfaces/control_protocol/control_protocol.cc b/libs/surfaces/control_protocol/control_protocol.cc index 8accb99ea2..8c2a121779 100644 --- a/libs/surfaces/control_protocol/control_protocol.cc +++ b/libs/surfaces/control_protocol/control_protocol.cc @@ -360,13 +360,17 @@ ControlProtocol::set_first_selected_stripable (boost::shared_ptr<Stripable> s) void ControlProtocol::stripable_selection_changed (StripableNotificationListPtr sp) { + bool had_selection = !_last_selected.empty(); + _last_selected = *sp; { Glib::Threads::Mutex::Lock lm (first_selected_mutex); if (!_last_selected.empty()) { - _first_selected_stripable = _last_selected.front().lock(); + if (!had_selection) { + _first_selected_stripable = _last_selected.front().lock(); + } } else { _first_selected_stripable = boost::weak_ptr<Stripable>(); } |