From e2d4750f41dbd2bf7a67b35951ddd909c29e9ded Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 29 Nov 2004 12:15:25 +0000 Subject: [PATCH] Bug reported by Wavez; Leftmouse select option doesn't work with "Emulate 3 button mouse" option. The latter maps middle mouse to ALT+leftmouse, frustrating loop select for example. Add tooltip to say this, made option to disable automatic on load (version check) and made buttons redraw to show option being disabled. Note; wrapping middle mouse to ALT+RMB will frustrate 1 button mices... the current code for leftmouse-select is a hack at best, better do this good when we have proper event handlers system. --- source/blender/src/space.c | 10 +++++++--- source/blender/src/usiblender.c | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/source/blender/src/space.c b/source/blender/src/space.c index be6706882c5..6a07a1bd0c0 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2348,11 +2348,15 @@ void drawinfospace(ScrArea *sa, void *spacedata) (xpos+(2*edgsp)+(3*mpref)+(3*midsp)),y4label+5,mpref,buth, 0, 0, 0, 0, 0, ""); } - - uiDefButBitS(block, TOG, USER_TWOBUTTONMOUSE, 0, "Emulate 3 Button Mouse", + + /* illegal combo... */ + if (U.flag & USER_LMOUSESELECT) + U.flag &= ~USER_TWOBUTTONMOUSE; + + uiDefButBitS(block, TOG, USER_TWOBUTTONMOUSE, B_DRAWINFO, "Emulate 3 Button Mouse", (xpos+edgsp+(3*mpref)+(4*midsp)),y3,mpref,buth, &(U.flag), 0, 0, 0, 0, - "Emulates a middle mouse button with Alt LeftMouse"); + "Emulates Middle Mouse with Alt+LeftMouse (doesnt work with Left Mouse Select option)"); uiDefBut(block, LABEL,0,"Middle Mouse Button:", diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index cbe2afab524..d74d55f5c95 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -259,6 +259,11 @@ int BIF_read_homefile(void) } } } + if (G.main->versionfile <= 235) { + /* illegal combo... */ + if (U.flag & USER_LMOUSESELECT) + U.flag &= ~USER_TWOBUTTONMOUSE; + } space_set_commmandline_options();