From 929754f48c7e818d7cb37107a553d2f2de8c5ce6 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 17 Apr 2020 22:44:50 +0200 Subject: Prefer PBD::Unwinder to temporarily change a variable --- gtk2_ardour/editor_ops.cc | 4 +--- 1 file changed, 1 insertion(+), 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 zf (zoom_focus, Editing::ZoomFocusMouse); temporal_zoom_step_scale (zoom_out, scale); - zoom_focus = temp_focus; } void -- cgit v1.2.3