Prefer PBD::Unwinder to temporarily change a variable

This commit is contained in:
Robin Gareus 2020-04-17 22:44:50 +02:00
parent f2f9798df1
commit 929754f48c
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1719,10 +1719,8 @@ Editor::tav_zoom_smooth (bool coarser, bool force_all)
void void
Editor::temporal_zoom_step_mouse_focus_scale (bool zoom_out, double scale) Editor::temporal_zoom_step_mouse_focus_scale (bool zoom_out, double scale)
{ {
Editing::ZoomFocus temp_focus = zoom_focus; PBD::Unwinder<Editing::ZoomFocus> zf (zoom_focus, Editing::ZoomFocusMouse);
zoom_focus = Editing::ZoomFocusMouse;
temporal_zoom_step_scale (zoom_out, scale); temporal_zoom_step_scale (zoom_out, scale);
zoom_focus = temp_focus;
} }
void void