summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-06-17 18:26:35 +0200
committerRobin Gareus <robin@gareus.org>2017-06-17 18:29:23 +0200
commitfec5aec9a00bfc17caf023a6b48d0fd0047a9994 (patch)
tree597f91ed8b424e59c6a7220dbdfa84530067c294 /gtk2_ardour
parentea1669aa00d0d55219531f22b747b994440977fd (diff)
Fix TrackView selection after re-order.
because reordering a TreeView [pragmatically] does not retain selection.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_routes.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_routes.cc b/gtk2_ardour/editor_routes.cc
index 5db3b736be..99d6cae559 100644
--- a/gtk2_ardour/editor_routes.cc
+++ b/gtk2_ardour/editor_routes.cc
@@ -1050,11 +1050,11 @@ EditorRoutes::sync_treeview_from_presentation_info (PropertyChange const & what_
TreeModel::Children rows = _model->children();
- if (what_changed.contains (hidden_or_order)) {
+ bool changed = false;
+ if (what_changed.contains (hidden_or_order)) {
vector<int> neworder;
uint32_t old_order = 0;
- bool changed = false;
if (rows.empty()) {
return;
@@ -1101,15 +1101,13 @@ EditorRoutes::sync_treeview_from_presentation_info (PropertyChange const & what_
}
}
- if (what_changed.contains (Properties::selected)) {
-
+ if (changed || what_changed.contains (Properties::selected)) {
/* by the time this is invoked, the GUI Selection model has
* already updated itself.
*/
-
PBD::Unwinder<bool> uw (_ignore_selection_change, true);
- /* set the treeview model selection state */
+ /* set the treeview model selection state */
for (TreeModel::Children::iterator ri = rows.begin(); ri != rows.end(); ++ri) {
boost::shared_ptr<Stripable> stripable = (*ri)[_columns.stripable];
if (stripable && stripable->is_selected()) {