Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-09-17 15:45:38 +0400
committerTon Roosendaal <ton@blender.org>2006-09-17 15:45:38 +0400
commit3eb8262cb5346bed03e6fcc245bb1ea6b101caea (patch)
treeed4bab42c4037fb9232e50a6a26ca7e2034a049b /source/blender/src/toets.c
parent31479632371a9b68126392fc907c2fd696938610 (diff)
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.
Diffstat (limited to 'source/blender/src/toets.c')
-rw-r--r--source/blender/src/toets.c13
1 files 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;