diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b6da4b0bbf..05bae8a9e5 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -338,7 +338,6 @@ Editor::Editor () _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) { @@ -4182,7 +4181,6 @@ Editor::current_visual_state (bool with_tracks) 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) { @@ -4240,7 +4238,6 @@ Editor::use_visual_state (VisualState& vs) 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::iterator i = vs.track_states.begin(); i != vs.track_states.end(); ++i) { TrackViewList::iterator t; diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index 34d402c049..c4f2d9f887 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -448,7 +448,6 @@ class Editor : public PublicEditor double frames_per_unit; nframes64_t leftmost_frame; Editing::ZoomFocus zoom_focus; - bool zoomed_to_region; std::list track_states; }; @@ -1127,8 +1126,7 @@ class Editor : public PublicEditor 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); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 937743d62b..b750dd46f7 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -310,9 +310,9 @@ Editor::register_actions () 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); diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 0e1c4d12e4..a727e1610a 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1766,18 +1766,13 @@ Editor::temporal_zoom_region (bool both_axes) 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 diff --git a/gtk2_ardour/editor_selection.cc b/gtk2_ardour/editor_selection.cc index b77d1b4935..3894a96d52 100644 --- a/gtk2_ardour/editor_selection.cc +++ b/gtk2_ardour/editor_selection.cc @@ -893,8 +893,6 @@ Editor::region_selection_changed () sensitize_the_right_region_actions (!selection->regions.empty()); - zoomed_to_region = false; - _regions->block_change_connection (false); editor_regions_selection_changed_connection.block(false); }