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
1 changed files with 1 additions and 3 deletions

View File

@ -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