diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2014-12-22 11:59:05 -0600 |
---|---|---|
committer | Ben Loftis <ben@harrisonconsoles.com> | 2014-12-22 17:42:43 -0600 |
commit | 1211278a2b368a4acc0e26ae5f064544b4b1ffec (patch) | |
tree | 3c5c03feaeef24257948b08e5d1134fc2fed78eb /gtk2_ardour/editor_ops.cc | |
parent | c404ef985682a9f3e2c70aa84bf953ab6adecf71 (diff) |
consolidate zoom-to-range and zoom-to-regions into: zoom-to-selection. ToDo: zoom to selection of midi notes, control points, tracks(?)
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index d9575cb6f9..64a7d1a059 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1760,17 +1760,20 @@ Editor::temporal_zoom_region (bool both_axes) redo_visual_stack.push_back (current_visual_state (both_axes)); } -void -Editor::zoom_to_region (bool both_axes) -{ - temporal_zoom_region (both_axes); -} void Editor::temporal_zoom_selection (bool both_axes) { if (!selection) return; + //ToDo: if notes are selected, zoom to that + + //ToDo: if control points are selected, zoom to that + + //if region(s) are selected, zoom to that + if ( !selection->regions.empty() ) + temporal_zoom_region (both_axes); + //if a range is selected, zoom to that if (!selection->time.empty()) { @@ -1784,11 +1787,8 @@ Editor::temporal_zoom_selection (bool both_axes) if (both_axes) fit_selected_tracks(); - } else { - temporal_zoom_region (both_axes); } - } void |