<menuitem action='temporal-zoom-in'/>
<menuitem action='temporal-zoom-out'/>
<menuitem action='zoom-to-session'/>
- <menuitem action='zoom-to-region'/>
- <menuitem action='zoom-to-region-both-axes'/>
- <menuitem action='zoom-to-range'/>
- <menuitem action='zoom-to-range-both-axes'/>
+ <menuitem action='zoom-to-selection'/>
+ <menuitem action='zoom-to-selection-both-axes'/>
<menuitem action='toggle-zoom'/>
<menuitem action='expand-tracks'/>
<menuitem action='shrink-tracks'/>
void calc_extra_zoom_edges(framepos_t &start, framepos_t &end);
void temporal_zoom_selection (bool both_axes = false);
void temporal_zoom_region (bool both_axes);
- void zoom_to_region (bool both_axes);
void temporal_zoom_session ();
void temporal_zoom (framecnt_t samples_per_pixel);
void temporal_zoom_by_frame (framepos_t start, framepos_t end);
reg_sens (editor_actions, "temporal-zoom-out", _("Zoom Out"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), true));
reg_sens (editor_actions, "temporal-zoom-in", _("Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false));
reg_sens (editor_actions, "zoom-to-session", _("Zoom to Session"), sigc::mem_fun(*this, &Editor::temporal_zoom_session));
- reg_sens (editor_actions, "zoom-to-region", _("Zoom to Region"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_to_region), false));
- reg_sens (editor_actions, "zoom-to-region-both-axes", _("Zoom to Region (Width and Height)"), sigc::bind (sigc::mem_fun(*this, &Editor::zoom_to_region), true));
- reg_sens (editor_actions, "zoom-to-range", _("Zoom to Range"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), false));
- reg_sens (editor_actions, "zoom-to-range-both-axes", _("Zoom to Range (Width and Height)"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), true));
+ reg_sens (editor_actions, "zoom-to-selection", _("Zoom to Selection"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), false));
+ reg_sens (editor_actions, "zoom-to-selection-both-axes", _("Zoom to Selection (Width and Height)"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_selection), true));
reg_sens (editor_actions, "toggle-zoom", _("Toggle Zoom State"), sigc::mem_fun(*this, &Editor::swap_visual_state));
reg_sens (editor_actions, "expand-tracks", _("Expand Track Height"), sigc::bind (sigc::mem_fun (*this, &Editor::tav_zoom_step), false));
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()) {
if (both_axes)
fit_selected_tracks();
- } else {
- temporal_zoom_region (both_axes);
}
-
}
void
;; BOTTOM ROW
-@mmode|Editor/zoom-to-range|z|zoom to selection
+@mmode|Editor/zoom-to-selection|z|zoom to selection
+@vis|Editor/zoom-to-selection-both-axes|<@PRIMARY@><@SECONDARY@>z|zoom to selection, x and y
@edit|Editor/undo|<@PRIMARY@>z|undo
@edit|Editor/alternate-alternate-redo|<@PRIMARY@><@TERTIARY@>z|redo
-@vis|Editor/zoom-to-region|<@PRIMARY@><@SECONDARY@>z|zoom (x) to selected region(s)
-@vis|Editor/zoom-to-region-both-axes|<@SECONDARY@>z|zoom (x+y) to selected region
@vis|Editor/toggle-zoom|<@TERTIARY@>z|toggle last 2 zoom states
@edit|Editor/editor-cut|<@PRIMARY@>x|cut
;@-group|Editor/crop|c|some text