diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-26 23:20:42 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-26 23:20:42 +0300 |
commit | 230784b824c411b8b7f34fbc422ab3849b40fa14 (patch) | |
tree | f9e6ca7364d084cf02e81514ed54f476fcacbf36 /source/blender | |
parent | a34432aa8c351176d66e21ee9047e4c95b8e8941 (diff) |
Bug fix #1893
Option to switch left/right mouse didn't work for floating panels. It then
still selected stuff behind the button.
Was due to using wrong variable for events.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/src/drawoops.c | 17 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 4 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 4 | ||||
-rw-r--r-- | source/blender/src/editsound.c | 4 | ||||
-rw-r--r-- | source/blender/src/header_oops.c | 1 | ||||
-rw-r--r-- | source/blender/src/space.c | 28 | ||||
-rw-r--r-- | source/blender/src/toolbox.c | 2 |
7 files changed, 23 insertions, 37 deletions
diff --git a/source/blender/src/drawoops.c b/source/blender/src/drawoops.c index 4cfae91c665..bb75986e571 100644 --- a/source/blender/src/drawoops.c +++ b/source/blender/src/drawoops.c @@ -396,7 +396,6 @@ void drawoopsspace(ScrArea *sa, void *spacedata) SpaceOops *soops= spacedata; Oops *oops; float col[3]; - int ofsx, ofsy; BIF_GetThemeColor3fv(TH_BACK, col); glClearColor(col[0], col[1], col[2], 0.0); @@ -408,16 +407,6 @@ void drawoopsspace(ScrArea *sa, void *spacedata) boundbox_oops(); calc_scrollrcts(G.v2d, curarea->winx, curarea->winy); - if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) { - if(G.v2d->scroll) { - ofsx= curarea->winrct.xmin; /* because of mywin */ - ofsy= curarea->winrct.ymin; - - glViewport(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); - glScissor(ofsx+G.v2d->mask.xmin, ofsy+G.v2d->mask.ymin, ( ofsx+G.v2d->mask.xmax-1)-(ofsx+G.v2d->mask.xmin)+1, ( ofsy+G.v2d->mask.ymax-1)-( ofsy+G.v2d->mask.ymin)+1); - } - } - myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); oopscalex= .14*((float)curarea->winx)/(G.v2d->cur.xmax-G.v2d->cur.xmin); @@ -453,8 +442,10 @@ void drawoopsspace(ScrArea *sa, void *spacedata) /* ortho at pixel level curarea */ myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375); - if(sa->winx>SCROLLB+10 && sa->winy>SCROLLH+10) { - if(G.v2d->scroll) drawscroll(0); + if(soops->type==SO_OUTLINER) { + if(sa->winx>SCROLLB+10 && sa->winy>SCROLLH+10) { + if(G.v2d->scroll) drawscroll(0); + } } draw_area_emboss(sa); diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 0e2f4038eb4..45f9b850595 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -2248,10 +2248,10 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = L_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = R_MOUSE; } diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 63c236ba452..a61fac1bdb6 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -200,10 +200,10 @@ void winqreadnlaspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = L_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = R_MOUSE; } diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 6b821772de8..5093a6f57a1 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -119,10 +119,10 @@ void winqreadsoundspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = L_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = R_MOUSE; } diff --git a/source/blender/src/header_oops.c b/source/blender/src/header_oops.c index 630d2a8122f..24dcd19b97d 100644 --- a/source/blender/src/header_oops.c +++ b/source/blender/src/header_oops.c @@ -86,6 +86,7 @@ void do_oops_buttons(short event) switch(event) { case B_OOPSHOME: + init_v2d_oops(curarea, curarea->spacedata.first); // forces min/max to be reset boundbox_oops(); G.v2d->cur= G.v2d->tot; dx= 0.15*(G.v2d->cur.xmax-G.v2d->cur.xmin); diff --git a/source/blender/src/space.c b/source/blender/src/space.c index e2f8007ff70..be6706882c5 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -729,11 +729,8 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { - event = RIGHTMOUSE; - } else if (evt->event == RIGHTMOUSE) { - event = LEFTMOUSE; - } + if (event==LEFTMOUSE) event = RIGHTMOUSE; + else if (event==RIGHTMOUSE) event = LEFTMOUSE; } /* TEXTEDITING?? */ @@ -1762,10 +1759,10 @@ static void winqreadipospace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = L_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = R_MOUSE; } @@ -3091,10 +3088,10 @@ static void winqreadseqspace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = L_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = R_MOUSE; } @@ -3541,10 +3538,10 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt) /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { + if (event == LEFTMOUSE) { event = RIGHTMOUSE; mousebut = R_MOUSE; - } else if (evt->event == RIGHTMOUSE) { + } else if (event == RIGHTMOUSE) { event = LEFTMOUSE; mousebut = L_MOUSE; } @@ -3841,13 +3838,10 @@ static void winqreadoopsspace(ScrArea *sa, void *spacedata, BWinEvent *evt) else { /* swap mouse buttons based on user preference */ if (U.flag & USER_LMOUSESELECT) { - if (evt->event == LEFTMOUSE) { - event = RIGHTMOUSE; - } else if (evt->event == RIGHTMOUSE) { - event = LEFTMOUSE; - } + if (event==LEFTMOUSE) event = RIGHTMOUSE; + else if (event==RIGHTMOUSE) event = LEFTMOUSE; } - + switch(event) { case LEFTMOUSE: gesture(); diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index b7843154772..48d6919da7b 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1813,7 +1813,7 @@ static TBitem tb_mesh[]= { { 0, "Show/Hide Faces", 3, NULL}, { 0, "Show/Hide Normals", 4, NULL}, { 0, "SEPR", 0, NULL}, -{ 0, "Subdivision Surface|Shift O", 5, NULL}, +{ 0, "Subdivision Surface", 5, NULL}, { 0, "SubSurf Optimal", 6, NULL}, { 0, "SEPR", 0, NULL}, { 0, "Show/Hide Vertices", 0, tb_obdata_hide}, |