From 3eb8262cb5346bed03e6fcc245bb1ea6b101caea Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sun, 17 Sep 2006 11:45:38 +0000 Subject: [PATCH] Patch #4995, bugfix #4985 Patch for this bug provided by Johannes Meng. Here's his log: When using the mouse wheel on an inverted 3d view (that is back, left or bottom) the name display changed to front (right, top). Also when using mouse wheel with modifier keys (strg/shift) on a normal view, it changed the display to the inverted variant. What I did was check the type of event that is handeled before setting/unsetting V3D_OPP_DIRECTION_NAME. I simply added two if statements and expanded the comment by a line explaining it a bit. --- source/blender/src/toets.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 93d38ad6b34..2b6327df80c 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -139,8 +139,10 @@ void persptoetsen(unsigned short event) } else if((G.qual & (LR_SHIFTKEY | LR_CTRLKEY)) && (event != PAD0)) { - /* indicate that this view is inverted */ - G.vd->flag2 |= V3D_OPP_DIRECTION_NAME; + /* Indicate that this view is inverted, + * but only if it actually _was_ inverted (jobbe) */ + if (event==PAD7 || event == PAD1 || event == PAD3) + G.vd->flag2 |= V3D_OPP_DIRECTION_NAME; if(event==PAD0) { /* G.vd->persp= 3; */ @@ -201,8 +203,11 @@ void persptoetsen(unsigned short event) } } else { - /* indicate that this view is not inverted */ - G.vd->flag2 &= ~V3D_OPP_DIRECTION_NAME; + /* Indicate that this view is not inverted. + * Don't do this for PADMINUS/PADPLUSKEY, though. (jobbe)*/ + if (event != PADMINUS && event != PADPLUSKEY) + G.vd->flag2 &= ~V3D_OPP_DIRECTION_NAME; + if(event==PAD7) { G.vd->viewquat[0]= 1.0;