[Summary] Bound waveform zoom In/Out to View->Zoom->Waveform Zoom In/Out menu items

This commit is contained in:
GZharun 2015-01-23 19:00:26 +02:00
parent f0637059f5
commit 027e264616
3 changed files with 12 additions and 2 deletions

View file

@ -295,6 +295,7 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
framecnt_t get_current_zoom () const { return samples_per_pixel; }
void cycle_zoom_focus ();
void temporal_zoom_step (bool coarser);
void waveform_zoom_step (bool coarser);
void ensure_time_axis_view_is_visible (TimeAxisView const & tav, bool at_top);
void tav_zoom_step (bool coarser);
void tav_zoom_smooth (bool coarser, bool force_all);

View file

@ -266,8 +266,8 @@ Editor::register_actions ()
reg_sens (editor_actions, "temporal-zoom-out", _("Zoom Out Horizontal"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), true));
reg_sens (editor_actions, "temporal-zoom-in", _("Zoom In Horizontal"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false));
reg_sens (editor_actions, "waveform-zoom-in", _("Waveform Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), true));
reg_sens (editor_actions, "waveform-zoom-out", _("Waveform Zoom Out"), sigc::bind (sigc::mem_fun(*this, &Editor::temporal_zoom_step), false));
reg_sens (editor_actions, "waveform-zoom-in", _("Waveform Zoom In"), sigc::bind (sigc::mem_fun(*this, &Editor::waveform_zoom_step), true));
reg_sens (editor_actions, "waveform-zoom-out", _("Waveform Zoom Out"), sigc::bind (sigc::mem_fun(*this, &Editor::waveform_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));

View file

@ -6587,6 +6587,15 @@ Editor::waveform_zoom_changed()
}
}
void
Editor::waveform_zoom_step(bool coarser)
{
ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_step, coarser)
int zoom_step = coarser ? 1 : -1;
_waves_zoom_adjustment.set_value(_waves_zoom_adjustment.get_value() + zoom_step);
}
void
Editor::toggle_tracks_active ()
{