summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_regions.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-18 23:31:39 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-18 23:31:39 +0000
commit3defa8b521fe350a09bd5a56b96517b62a737476 (patch)
tree1fde430baf40ce25ff223cce04c774ac0ecadcd1 /gtk2_ardour/editor_regions.cc
parent9054c71fb86d10cb3af22f24ec5083d4f795d82d (diff)
Preserve region list selection state even if a region is selected which is not shown in the editor.
git-svn-id: svn://localhost/ardour2/branches/3.0@7802 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_regions.cc')
-rw-r--r--gtk2_ardour/editor_regions.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc
index 9fc2a70663..7034a76af1 100644
--- a/gtk2_ardour/editor_regions.cc
+++ b/gtk2_ardour/editor_regions.cc
@@ -377,6 +377,13 @@ EditorRegions::selection_changed ()
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;
@@ -409,6 +416,8 @@ EditorRegions::selection_changed ()
} else {
_editor->get_selection().clear_regions ();
}
+
+ _editor->_block_region_list_update_if_empty = false;
}
void