mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
Don't scroll-jump when selecting all tracks
This commit is contained in:
parent
85e3d2158e
commit
c8d6ddfd10
5 changed files with 15 additions and 2 deletions
|
|
@ -393,6 +393,7 @@ Editor::Editor ()
|
|||
, _all_region_actions_sensitized (false)
|
||||
, _ignore_region_action (false)
|
||||
, _last_region_menu_was_main (false)
|
||||
, _track_selection_change_without_scroll (false)
|
||||
, cd_marker_bar_drag_rect (0)
|
||||
, range_bar_drag_rect (0)
|
||||
, transport_bar_drag_rect (0)
|
||||
|
|
|
|||
|
|
@ -1606,6 +1606,10 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void queue_visual_videotimeline_update ();
|
||||
void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true);
|
||||
|
||||
bool track_selection_change_without_scroll () const {
|
||||
return _track_selection_change_without_scroll;
|
||||
}
|
||||
|
||||
PBD::Signal0<void> EditorFreeze;
|
||||
PBD::Signal0<void> EditorThaw;
|
||||
|
||||
|
|
@ -1856,6 +1860,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
|||
void point_selection_changed ();
|
||||
void marker_selection_changed ();
|
||||
|
||||
bool _track_selection_change_without_scroll;
|
||||
|
||||
void cancel_selection ();
|
||||
void cancel_time_selection ();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include <cstdlib>
|
||||
|
||||
#include "pbd/stacktrace.h"
|
||||
#include "pbd/unwind.h"
|
||||
|
||||
#include "ardour/midi_region.h"
|
||||
#include "ardour/playlist.h"
|
||||
|
|
@ -174,6 +175,7 @@ Editor::select_all_tracks ()
|
|||
visible_views.push_back (*i);
|
||||
}
|
||||
}
|
||||
PBD::Unwinder<bool> uw (_track_selection_change_without_scroll, true);
|
||||
selection->set (visible_views);
|
||||
}
|
||||
|
||||
|
|
@ -966,7 +968,9 @@ Editor::track_selection_changed ()
|
|||
* selected, because we always append to that list.
|
||||
*/
|
||||
set_selected_mixer_strip (*(selection->tracks.back()));
|
||||
ensure_time_axis_view_is_visible (*(selection->tracks.back()), false);
|
||||
if (!_track_selection_change_without_scroll) {
|
||||
ensure_time_axis_view_is_visible (*(selection->tracks.back()), false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -857,7 +857,7 @@ Mixer_UI::sync_treeview_from_presentation_info (PropertyChange const & what_chan
|
|||
}
|
||||
}
|
||||
|
||||
if (!_selection.axes.empty()) {
|
||||
if (!_selection.axes.empty() && !PublicEditor::instance().track_selection_change_without_scroll ()) {
|
||||
move_stripable_into_view ((*_selection.axes.begin())->stripable());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -343,6 +343,8 @@ class PublicEditor : public Gtkmm2ext::Tabbable {
|
|||
virtual void set_video_timeline_height (const int h) = 0;
|
||||
virtual void embed_audio_from_video (std::string, framepos_t n = 0, bool lock_position_to_video = true) = 0;
|
||||
|
||||
virtual bool track_selection_change_without_scroll () const = 0;
|
||||
|
||||
virtual RouteTimeAxisView* get_route_view_by_route_id (const PBD::ID& id) const = 0;
|
||||
|
||||
virtual void get_equivalent_regions (RegionView* rv, std::vector<RegionView*>&, PBD::PropertyID) const = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue