Finally, the "Emulate 3 buttons" button in the userprefs actually
authorAlexander Ewering <blender@instinctive.de>
Wed, 10 Sep 2003 02:46:22 +0000 (02:46 +0000)
committerAlexander Ewering <blender@instinctive.de>
Wed, 10 Sep 2003 02:46:22 +0000 (02:46 +0000)
*does* turn ALT-LEFTMOUSE emulation on and off :)

source/blender/src/ghostwinlay.c

index f03831b9f717603d4f8a96d97fdb84bdf0a207ed..b96878f3ff23bc11aec1477674babefec8cde6fe 100644 (file)
@@ -42,6 +42,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "DNA_userdef_types.h" /* U.flag & TWOBUTTONMOUSE */
+
 #include "BLI_blenlib.h"
 
 #include "GHOST_C-api.h"
@@ -405,7 +407,8 @@ static int event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) {
                                if (val) {
                                        if (win->commandqual) {
                                                bbut= win->faked_mbut= RIGHTMOUSE;
-                                       } else if (win->lqual & LR_ALTKEY) {
+                                       } else if ((win->lqual & LR_ALTKEY) && (U.flag & TWOBUTTONMOUSE)) {
+                                               /* finally, it actually USES the userpref! :) -intrr */
                                                bbut= win->faked_mbut= MIDDLEMOUSE;
                                        }
                                } else {