From: Paul Davis Date: Thu, 7 Jul 2016 00:58:07 +0000 (-0400) Subject: set ControlProtocol::_first_selected_stripable at the right time only X-Git-Tag: 5.0-pre1~297 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=77a8da9010320469d184a9e7e36957f9cb8880a5;p=ardour.git set ControlProtocol::_first_selected_stripable at the right time only --- 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 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(); }