_dragging_edit_point = false;
_dragging_hscrollbar = false;
select_new_marker = false;
- zoomed_to_region = false;
rhythm_ferret = 0;
_bundle_manager = 0;
for (ARDOUR::DataType::iterator i = ARDOUR::DataType::begin(); i != ARDOUR::DataType::end(); ++i) {
vs->frames_per_unit = frames_per_unit;
vs->leftmost_frame = leftmost_frame;
vs->zoom_focus = zoom_focus;
- vs->zoomed_to_region = zoomed_to_region;
if (with_tracks) {
for (TrackViewList::iterator i = track_views.begin(); i != track_views.end(); ++i) {
set_zoom_focus (vs.zoom_focus);
reposition_and_zoom (vs.leftmost_frame, vs.frames_per_unit);
- zoomed_to_region = vs.zoomed_to_region;
for (list<TAVState>::iterator i = vs.track_states.begin(); i != vs.track_states.end(); ++i) {
TrackViewList::iterator t;
double frames_per_unit;
nframes64_t leftmost_frame;
Editing::ZoomFocus zoom_focus;
- bool zoomed_to_region;
std::list<TAVState> track_states;
};
void temporal_zoom_selection ();
void temporal_zoom_region (bool both_axes);
- void toggle_zoom_region (bool both_axes);
- bool zoomed_to_region;
+ void zoom_to_region (bool both_axes);
void temporal_zoom_session ();
void temporal_zoom (gdouble scale);
void temporal_zoom_by_frame (nframes64_t start, nframes64_t end, const std::string & op);
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "zoom-to-session", _("Zoom to Session"), mem_fun(*this, &Editor::temporal_zoom_session));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (editor_actions, "zoom-to-region", _("Zoom to Region"), bind (mem_fun(*this, &Editor::toggle_zoom_region), false));
+ act = ActionManager::register_action (editor_actions, "zoom-to-region", _("Zoom to Region"), bind (mem_fun(*this, &Editor::zoom_to_region), false));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (editor_actions, "zoom-to-region-both-axes", _("Zoom to Region (W&H)"), bind (mem_fun(*this, &Editor::toggle_zoom_region), true));
+ act = ActionManager::register_action (editor_actions, "zoom-to-region-both-axes", _("Zoom to Region (W&H)"), bind (mem_fun(*this, &Editor::zoom_to_region), true));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (editor_actions, "toggle-zoom", _("Toggle Zoom State"), mem_fun(*this, &Editor::swap_visual_state));
ActionManager::session_sensitive_actions.push_back (act);
no_save_visual = false;
}
- zoomed_to_region = true;
redo_visual_stack.push_back (current_visual_state());
}
void
-Editor::toggle_zoom_region (bool both_axes)
+Editor::zoom_to_region (bool both_axes)
{
- if (zoomed_to_region) {
- swap_visual_state ();
- } else {
- temporal_zoom_region (both_axes);
- }
+ temporal_zoom_region (both_axes);
}
void
sensitize_the_right_region_actions (!selection->regions.empty());
- zoomed_to_region = false;
-
_regions->block_change_connection (false);
editor_regions_selection_changed_connection.block(false);
}