diff options
author | Ton Roosendaal <ton@blender.org> | 2005-05-04 19:13:25 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-05-04 19:13:25 +0400 |
commit | 6db7d23b5fb7c028c205ba2d7db404665d204b4b (patch) | |
tree | d876815683bc70615db4db68a07b1780b3cea073 /source/blender/src/transform.c | |
parent | 3b2c30dae44c953332b37483634a6222ad214d18 (diff) |
On click-release for Manipulator handles, without moving mouse, it will
stick to transform() until another mouse press (or ESC etc)
Diffstat (limited to 'source/blender/src/transform.c')
-rwxr-xr-x | source/blender/src/transform.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index db209780492..4a2446ee138 100755 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -572,7 +572,7 @@ void Transform(int mode, int context) void ManipulatorTransform(int mode) { - int ret_val = 0; + int ret_val = 0, mouse_moved = 0; short pmval[2] = {0, 0}, mval[2], val; unsigned short event; @@ -648,6 +648,10 @@ void ManipulatorTransform(int mode) event= extern_qread(&val); switch (event){ + case MOUSEX: + case MOUSEY: + mouse_moved = 1; + break; /* enforce redraw of transform when modifiers are used */ case LEFTCTRLKEY: case RIGHTCTRLKEY: @@ -669,6 +673,8 @@ void ManipulatorTransform(int mode) ret_val = TRANS_CANCEL; break; case LEFTMOUSE: + if(mouse_moved==0 && val==0) break; + // else we pass on event to next, which cancels case SPACEKEY: case PADENTER: case RETKEY: |