, _pending_locate_request (false)
, _pending_initial_locate (false)
, _last_cut_copy_source_track (0)
+
+ , _block_region_list_update_if_empty (false)
{
constructed = false;
*/
TimeAxisView* _last_cut_copy_source_track;
+ /** true if the update of the region list's selection from the current Selection
+ should be blocked if the Selection is empty. See EditorRegions::selection_changed.
+ */
+ bool _block_region_list_update_if_empty;
+
friend class Drag;
friend class RegionDrag;
friend class RegionMoveDrag;
return;
}
+ /* We may have selected a region which is not displayed in the Editor. If this happens, the
+ result will be no selected regions in the editor's Selection. Without the following line,
+ this `no-selection' will be mapped back to our list, meaning that the selection will
+ appear not to take.
+ */
+ _editor->_block_region_list_update_if_empty = true;
+
if (_display.get_selection()->count_selected_rows() > 0) {
TreeIter iter;
} else {
_editor->get_selection().clear_regions ();
}
+
+ _editor->_block_region_list_update_if_empty = false;
}
void
_regions->block_change_connection (true);
editor_regions_selection_changed_connection.block(true);
- _regions->unselect_all ();
+ if (!_block_region_list_update_if_empty || !selection->regions.empty()) {
+ _regions->unselect_all ();
+ }
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
(*i)->set_selected_regionviews (selection->regions);