This commit is contained in:
Campbell Barton 2015-02-12 23:51:02 +11:00
parent e408e632a1
commit 7221fbe9dd
2 changed files with 9 additions and 8 deletions

@ -19,7 +19,7 @@
#define __KERNEL_CPU__
/* Release kernel has too much false-positive maybe-uninitialzied warnings,
/* Release kernel has too much false-positive maybe-uninitialized warnings,
* which makes it possible to miss actual warnings.
*/
#if defined(__GNUC__) && defined(NDEBUG)

@ -2042,7 +2042,8 @@ static void SCREEN_OT_region_scale(wmOperatorType *ot)
/* ************** frame change operator ***************************** */
static void areas_do_frame_follow (bContext *C, bool middle) {
static void areas_do_frame_follow(bContext *C, bool middle)
{
bScreen *scr = CTX_wm_screen(C);
Scene *scene = CTX_data_scene(C);
wmWindowManager *wm = CTX_wm_manager(C);
@ -2061,9 +2062,9 @@ static void areas_do_frame_follow (bContext *C, bool middle) {
float w = BLI_rctf_size_x(&ar->v2d.cur);
if (middle) {
if (scene->r.cfra < ar->v2d.cur.xmin || scene->r.cfra > ar->v2d.cur.xmax) {
ar->v2d.cur.xmax = scene->r.cfra + w/2;
ar->v2d.cur.xmin = scene->r.cfra - w/2;
if ((scene->r.cfra < ar->v2d.cur.xmin) || (scene->r.cfra > ar->v2d.cur.xmax)) {
ar->v2d.cur.xmax = scene->r.cfra + (w / 2);
ar->v2d.cur.xmin = scene->r.cfra - (w / 2);
}
}
else {