2.5
authorTon Roosendaal <ton@blender.org>
Wed, 29 Jul 2009 11:53:37 +0000 (11:53 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 29 Jul 2009 11:53:37 +0000 (11:53 +0000)
Small fix: SHIFT+D caused transform to move with more precision, as if
shiftkey was pressed.

source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_input.c

index 35915c96f3c038d46d71090ebb176ac30dce907e..e3e4822b383c71fb5d0b01cb4abd1f52436817df 100644 (file)
@@ -1947,7 +1947,7 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
 {
        int status = 0;
 
-       if (event->type == MIDDLEMOUSE && event->val)
+       if (event->type == MIDDLEMOUSE && event->val==KM_PRESS)
        {
                // Use customData pointer to signal warp direction
                if      (t->customData == 0)
@@ -2081,7 +2081,7 @@ int handleEventShear(TransInfo *t, wmEvent *event)
 {
        int status = 0;
 
-       if (event->type == MIDDLEMOUSE && event->val)
+       if (event->type == MIDDLEMOUSE && event->val==KM_PRESS)
        {
                // Use customData pointer to signal Shear direction
                if      (t->customData == 0)
@@ -3514,7 +3514,7 @@ void initBevel(TransInfo *t)
 
 int handleEventBevel(TransInfo *t, wmEvent *event)
 {
-       if (event->val) {
+       if (event->val==KM_PRESS) {
                if(!G.editBMesh) return 0;
 
                switch (event->type) {
index ae8aacb3477cf731b69dc5bd49396e1aa272d733..6bd0a8c8d42f24f62287eb5304132dd18f48c3c3 100644 (file)
@@ -317,7 +317,7 @@ int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
        {
        case LEFTSHIFTKEY:
        case RIGHTSHIFTKEY:
-               if (event->val)
+               if (event->val==KM_PRESS)
                {
                        t->modifiers |= MOD_PRECISION;
                        /* shift is modifier for higher precision transform