Fix T45901: Smooth-view w/ bg-image glitch

It was possible to rotate the view while the view was already moving
causing background images to show when they shouldn't.
This commit is contained in:
Campbell Barton 2015-08-26 10:12:36 +10:00
parent 2f0eb2bfc6
commit 2e6cbd9bda
Notes: blender-bot 2023-02-14 08:43:59 +01:00
Referenced by issue #45901, Background image shown when it is has not to
1 changed files with 5 additions and 2 deletions

View File

@ -137,6 +137,9 @@ struct SmoothView3DStore {
struct SmoothView3DState org; /* original */
bool to_camera;
/* When smooth-view is enabled, store the 'rv3d->view' here,
* assign back when the view motion is completed. */
char org_view;
double time_allowed;
@ -180,12 +183,12 @@ void ED_view3d_smooth_view_ex(
/* if smoothview runs multiple times... */
if (rv3d->sms == NULL) {
view3d_smooth_view_state_backup(&sms.org, v3d, rv3d);
sms.org_view = rv3d->view;
}
else {
sms.org = rv3d->sms->org;
sms.org_view = rv3d->sms->org_view;
}
sms.org_view = rv3d->view;
/* sms.to_camera = false; */ /* initizlized to zero anyway */
/* note on camera locking, this is a little confusing but works ok.