diff options
author | Robin Gareus <robin@gareus.org> | 2020-04-17 22:44:50 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-17 22:49:45 +0200 |
commit | 929754f48c7e818d7cb37107a553d2f2de8c5ce6 (patch) | |
tree | 3c5fcf3fb3f4b70448e1bf9f12eebd36fe2b4353 | |
parent | f2f9798df14adefb797d49e11444cf183a0960cb (diff) |
Prefer PBD::Unwinder to temporarily change a variable
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 0348940907..ead64e378d 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1719,10 +1719,8 @@ Editor::tav_zoom_smooth (bool coarser, bool force_all) void Editor::temporal_zoom_step_mouse_focus_scale (bool zoom_out, double scale) { - Editing::ZoomFocus temp_focus = zoom_focus; - zoom_focus = Editing::ZoomFocusMouse; + PBD::Unwinder<Editing::ZoomFocus> zf (zoom_focus, Editing::ZoomFocusMouse); temporal_zoom_step_scale (zoom_out, scale); - zoom_focus = temp_focus; } void |