diff options
author | Robin Gareus <robin@gareus.org> | 2017-10-21 17:27:03 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-10-21 21:07:18 +0200 |
commit | 231e25544bd67eda735e58567562522758b578d1 (patch) | |
tree | 0c18604c6dbde11048511a39f0ae0e823d54f46e /gtk2_ardour/mixer_ui.cc | |
parent | 63b6ab1101bf3e3f67226fa82c8fb11ea2f832e0 (diff) |
Tweak 842d758e: selection & move into view
Use separate editor + mixer flags for moving selected tracks into view.
Changing selection in the Editor will only pan the mixer-view and vice-
versa. This fixes an issue with the track that is being clicked-on to
be moved out of view (due to groups)
Diffstat (limited to 'gtk2_ardour/mixer_ui.cc')
-rw-r--r-- | gtk2_ardour/mixer_ui.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index ee2f22031f..1745d19f5c 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -111,6 +111,7 @@ Mixer_UI::Mixer_UI () , _route_deletion_in_progress (false) , _maximised (false) , _show_mixer_list (true) + , _strip_selection_change_without_scroll (false) , myactions (X_("mixer")) , _selection (*this, *this) { @@ -826,7 +827,7 @@ Mixer_UI::sync_treeview_from_presentation_info (PropertyChange const & what_chan } } - if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) { + if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll () && !_strip_selection_change_without_scroll) { move_stripable_into_view ((*_selection.axes.begin())->stripable()); } @@ -918,6 +919,17 @@ struct MixerStripSorter { bool Mixer_UI::strip_button_release_event (GdkEventButton *ev, MixerStrip *strip) { + /* Selecting a mixer-strip may also select grouped-tracks, and + * presentation_info_changed() being emitted and + * _selection.axes.begin() is being moved into view. This may + * effectively move the track that was clicked-on out of view. + * + * So here only the track that is actually clicked-on is moved into + * view (in case it's partially visible) + */ + PBD::Unwinder<bool> uw (_strip_selection_change_without_scroll, true); + move_stripable_into_view (strip->stripable()); + if (ev->button == 1) { if (_selection.selected (strip)) { /* primary-click: toggle selection state of strip */ |