Bug #1670
authorTon Roosendaal <ton@blender.org>
Tue, 26 Oct 2004 21:10:58 +0000 (21:10 +0000)
committerTon Roosendaal <ton@blender.org>
Tue, 26 Oct 2004 21:10:58 +0000 (21:10 +0000)
Just one simple report, 4-5 hours work...
reported was that selecting in action+nla window is slightly off. Quite
annoying. It appeared to be a wrong usage of View2D facilities, causing
part rewrite of a lot of stuff here. Mainly did it as excercise, to get
better understanding of all of this. Would need some testing though!

PLus; fixed crash while using "single user" menu with Ipos in Object.

source/blender/src/drawaction.c
source/blender/src/drawnla.c
source/blender/src/editaction.c
source/blender/src/editnla.c
source/blender/src/editobject.c
source/blender/src/editscreen.c
source/blender/src/outliner.c

index bf0c46823e51a3b0bfcdbc6b2e2670c561eea881..402f7684215b086954d74f121d3067d905ec33f7 100644 (file)
@@ -134,7 +134,7 @@ void meshactionbuts(SpaceAction *saction, Key *key)
 
        x = NAMEWIDTH + 1;
     y = key->totkey*(CHANNELHEIGHT+CHANNELSKIP) 
-         - CHANNELHEIGHT/2  - G.v2d->cur.ymin;
+         + CHANNELHEIGHT/2  - G.v2d->cur.ymin;
 
        /* make the little 'open the sliders' widget */
     BIF_ThemeColor(TH_FACE); // this slot was open...
@@ -307,30 +307,23 @@ static void draw_channel_names(void)
        short ofsx, ofsy = 0; 
        bAction *act;
        Key *key;
-       float col[3];
-
-       myortho2(0,     NAMEWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax);   //      Scaling
 
-       /* Blank out the area */
+       /* Clip to the scrollable area */
        if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
                if(G.v2d->scroll) {     
                        ofsx= curarea->winrct.xmin;     
                        ofsy= curarea->winrct.ymin;
-                       glViewport(ofsx,  ofsy+G.v2d->mask.ymin-SCROLLB, NAMEWIDTH, 
+                       glViewport(ofsx,  ofsy+G.v2d->mask.ymin, NAMEWIDTH, 
                                           (ofsy+G.v2d->mask.ymax) -
-                                          (ofsy+G.v2d->mask.ymin-SCROLLB)); 
-                       glScissor(ofsx,  ofsy+G.v2d->mask.ymin-SCROLLB, NAMEWIDTH, 
+                                          (ofsy+G.v2d->mask.ymin)); 
+                       glScissor(ofsx,  ofsy+G.v2d->mask.ymin, NAMEWIDTH, 
                                          (ofsy+G.v2d->mask.ymax) -
-                                         (ofsy+G.v2d->mask.ymin-SCROLLB));
+                                         (ofsy+G.v2d->mask.ymin));
                }
        }
        
-       BIF_GetThemeColor3fv(TH_HEADER, col);
-       glClearColor(col[0], col[1], col[2], 0.0); 
-       glClear(GL_COLOR_BUFFER_BIT);
-
-       /* Clip to the scrollable area */
-
+       myortho2(0,     NAMEWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax);   //      Scaling
+       
        glColor3ub(0x00, 0x00, 0x00);
 
        act=G.saction->action;
@@ -349,7 +342,7 @@ static void draw_channel_names(void)
     }
 
     myortho2(0,        NAMEWIDTH, 0, (ofsy+G.v2d->mask.ymax) -
-              (ofsy+G.v2d->mask.ymin-SCROLLB));        //      Scaling
+              (ofsy+G.v2d->mask.ymin));        //      Scaling
 
 }
 
@@ -422,7 +415,7 @@ static void draw_channel_strips(SpaceAction *saction)
                return;
 
        scr_rct.xmin= saction->area->winrct.xmin + ACTWIDTH;
-       scr_rct.ymin= saction->area->winrct.ymin + saction->v2d.mask.ymin-SCROLLB;
+       scr_rct.ymin= saction->area->winrct.ymin + saction->v2d.mask.ymin;
        scr_rct.xmax= saction->area->winrct.xmin + saction->v2d.hor.xmax;
        scr_rct.ymax= saction->area->winrct.ymin + saction->v2d.mask.ymax; 
        di= glaBegin2DDraw(&scr_rct, &G.v2d->cur);
@@ -487,7 +480,7 @@ static void draw_mesh_strips(SpaceAction *saction, Key *key)
        if (!key->ipo) return;
 
        scr_rct.xmin= saction->area->winrct.xmin + ACTWIDTH;
-       scr_rct.ymin= saction->area->winrct.ymin + saction->v2d.mask.ymin-SCROLLB;
+       scr_rct.ymin= saction->area->winrct.ymin + saction->v2d.mask.ymin;
        scr_rct.xmax= saction->area->winrct.xmin + saction->v2d.hor.xmax;
        scr_rct.ymax= saction->area->winrct.ymin + saction->v2d.mask.ymax; 
        di= glaBegin2DDraw(&scr_rct, &G.v2d->cur);
@@ -621,6 +614,11 @@ void drawactionspace(ScrArea *sa, void *spacedata)
 
        calc_scrollrcts(G.v2d, curarea->winx, curarea->winy);
 
+       /* background color for entire window (used in lefthand part tho) */
+       BIF_GetThemeColor3fv(TH_HEADER, col);
+       glClearColor(col[0], col[1], col[2], 0.0); 
+       glClear(GL_COLOR_BUFFER_BIT);
+       
        if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
                if(G.v2d->scroll) {     
                        ofsx= curarea->winrct.xmin;     
index 7f3e4a589c61b7bcd3a543a0337e3182a18b7665..d95254a4c22319226b1eec58877a2352f624f9a4 100644 (file)
@@ -96,26 +96,19 @@ static void draw_nlatree(void)
        float   x, y;
        bActionStrip *strip;
        bConstraintChannel *conchan;
-       float col[3];
 
        myortho2(0,     NLAWIDTH, G.v2d->cur.ymin, G.v2d->cur.ymax);    //      Scaling
 
-       /* Blank out the area */
+       /* Clip to the scrollable area */
        if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
                if(G.v2d->scroll) {     
                        ofsx= curarea->winrct.xmin;     
                        ofsy= curarea->winrct.ymin;
-                       glViewport(ofsx,  ofsy+G.v2d->mask.ymin-SCROLLB, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB)); 
-                       glScissor(ofsx,  ofsy+G.v2d->mask.ymin-SCROLLB, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB));
+                       glViewport(ofsx,  ofsy+G.v2d->mask.ymin, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin)); 
+                       glScissor(ofsx,  ofsy+G.v2d->mask.ymin, NLAWIDTH, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin));
                }
        }
        
-       BIF_GetThemeColor3fv(TH_HEADER, col);
-       glClearColor(col[0], col[1], col[2], 0.0); 
-       glClear(GL_COLOR_BUFFER_BIT);
-
-       /* Clip to the scrollable area */
-
        glColor3ub(0x00, 0x00, 0x00);
        
        x = 0.0;
@@ -197,7 +190,7 @@ static void draw_nlatree(void)
                }
        }
        
-       myortho2(0,     NLAWIDTH, 0, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin-SCROLLB));        //      Scaling
+       myortho2(0,     NLAWIDTH, 0, ( ofsy+G.v2d->mask.ymax)-( ofsy+G.v2d->mask.ymin));        //      Scaling
 }
 
 static void draw_nlastrips(SpaceNla *snla)
@@ -215,7 +208,7 @@ static void draw_nlastrips(SpaceNla *snla)
        /* Draw strips */
 
        scr_rct.xmin= snla->area->winrct.xmin + NLAWIDTH;
-       scr_rct.ymin= snla->area->winrct.ymin + snla->v2d.mask.ymin-SCROLLB;
+       scr_rct.ymin= snla->area->winrct.ymin + snla->v2d.mask.ymin;
        scr_rct.xmax= snla->area->winrct.xmin + snla->v2d.hor.xmax;
        scr_rct.ymax= snla->area->winrct.ymin + snla->v2d.mask.ymax; 
        di= glaBegin2DDraw(&scr_rct, &G.v2d->cur);
@@ -546,6 +539,11 @@ void drawnlaspace(ScrArea *sa, void *spacedata)
        
        calc_scrollrcts(G.v2d, curarea->winx, curarea->winy);
        
+       /* clear all, becomes the color for left part */
+       BIF_GetThemeColor3fv(TH_HEADER, col);
+       glClearColor(col[0], col[1], col[2], 0.0); 
+       glClear(GL_COLOR_BUFFER_BIT);
+       
        if(curarea->winx>SCROLLB+10 && curarea->winy>SCROLLH+10) {
                if(G.v2d->scroll) {     
                        ofsx= curarea->winrct.xmin;     
index 8a4bc9d72067ac76e169eea90ea1f0780bfa07a0..06bade5365da315f3ee4a1836049e64aadd440dc 100644 (file)
@@ -365,18 +365,18 @@ static bActionChannel *get_nearest_actionchannel_key (float *index, short *sel,
 
        mval[0]-=7;
        areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin);
-
        mval[0]+=14;
        areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
 
-       ymax = count_action_levels (act) * (CHANNELHEIGHT + CHANNELSKIP);
-
+       ymax = count_action_levels(act) * (CHANNELHEIGHT + CHANNELSKIP);
+       ymax += CHANNELHEIGHT/2;
+       
        *sel=0;
 
        for (chan=act->chanbase.first; chan; chan=chan->next){
 
                /* Check action channel */
-               ymin=ymax-(CHANNELHEIGHT+CHANNELSKIP);
+               ymin= ymax-(CHANNELHEIGHT+CHANNELSKIP);
                if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){
                        for (icu=chan->ipo->curve.first; icu; icu=icu->next){
                                for (i=0; i<icu->totvert; i++){
@@ -472,6 +472,7 @@ static IpoCurve *get_nearest_meshchannel_key (float *index, short *sel)
     areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
 
     ybase = key->totkey * (CHANNELHEIGHT + CHANNELSKIP);
+       ybase += CHANNELHEIGHT/2;
     *sel=0;
 
     /* lets loop through the IpoCurves trying to find the closest
@@ -678,7 +679,9 @@ void borderselect_action(void)
                mval[1]= rect.ymax-2;
                areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
                
-               ymax=count_action_levels(act) * (CHANNELHEIGHT+CHANNELSKIP);
+               ymax= count_action_levels(act) * (CHANNELHEIGHT+CHANNELSKIP);
+               ymax += CHANNELHEIGHT/2;
+               
                for (chan=act->chanbase.first; chan; chan=chan->next){
                        
                        /* Check action */
@@ -1661,7 +1664,7 @@ static void mouse_actionchannels(bAction *act, short *mval,
         * a rectangle.
         */
        bActionChannel *chan;
-       float   click;
+       float   click, x,y;
        int   clickmin, clickmax;
        int             wsize, sel;
        bConstraintChannel *conchan;
@@ -1678,23 +1681,20 @@ static void mouse_actionchannels(bAction *act, short *mval,
         * needed to draw all of the action channels and constraint
         * channels.
         */
-       wsize = (count_action_levels (act)*(CHANNELHEIGHT+CHANNELSKIP));
+       wsize =  count_action_levels(act)*(CHANNELHEIGHT+CHANNELSKIP);
+       wsize += CHANNELHEIGHT/2;
 
-       click = (wsize-(mval[1]+G.v2d->cur.ymin));
-       click += CHANNELHEIGHT/2;
-       click /= (CHANNELHEIGHT+CHANNELSKIP);
+    areamouseco_to_ipoco(G.v2d, mval, &x, &y);
+    clickmin = (int) ((wsize - y) / (CHANNELHEIGHT+CHANNELSKIP));
        
-       clickmin = (int) click;
-
        /* Only one click */
        if (mvalo == NULL) {
                clickmax = clickmin;
        }
        /* Two click values (i.e., border select */
        else {
-               click = (wsize-(mvalo[1]+G.v2d->cur.ymin));
-               click += CHANNELHEIGHT/2;
-               click /= (CHANNELHEIGHT+CHANNELSKIP);
+               areamouseco_to_ipoco(G.v2d, mvalo, &x, &y);
+               click = ((wsize - y) / (CHANNELHEIGHT+CHANNELSKIP));
 
                if ( ((int) click) < clickmin) {
                        clickmax = clickmin;
@@ -2012,7 +2012,7 @@ void select_all_keys_frames(bAction *act, short *mval,
 void select_all_keys_channels(bAction *act, short *mval, 
                               short *mvalo, int selectmode) {
        bActionChannel    *chan;
-       float              click;
+       float              click, x,y;
        int                clickmin, clickmax;
        int                wsize;
        bConstraintChannel *conchan;
@@ -2040,24 +2040,23 @@ void select_all_keys_channels(bAction *act, short *mval,
         * needed to draw all of the action channels and constraint
         * channels.
         */
-       wsize = (count_action_levels (act)*(CHANNELHEIGHT+CHANNELSKIP));
-
-       click = (wsize-(mval[1]+G.v2d->cur.ymin));
-       click += CHANNELHEIGHT/2;
-       click /= (CHANNELHEIGHT+CHANNELSKIP);
-
-       clickmin = (int) click;
 
+       wsize =  count_action_levels(act)*(CHANNELHEIGHT+CHANNELSKIP);
+       wsize += CHANNELHEIGHT/2;
+       
+    areamouseco_to_ipoco(G.v2d, mval, &x, &y);
+    clickmin = (int) ((wsize - y) / (CHANNELHEIGHT+CHANNELSKIP));
+       
        /* Only one click */
        if (mvalo == NULL) {
                clickmax = clickmin;
        }
        /* Two click values (i.e., border select) */
        else {
-               click = (wsize-(mvalo[1]+G.v2d->cur.ymin));
-               click += CHANNELHEIGHT/2;
-               click /= (CHANNELHEIGHT+CHANNELSKIP);
 
+               areamouseco_to_ipoco(G.v2d, mvalo, &x, &y);
+               click = ((wsize - y) / (CHANNELHEIGHT+CHANNELSKIP));
+               
                if ( ((int) click) < clickmin) {
                        clickmax = clickmin;
                        clickmin = (int) click;
@@ -2576,7 +2575,7 @@ int get_nearest_key_num(Key *key, short *mval, float *x) {
     areamouseco_to_ipoco(G.v2d, mval, x, &y);
 
     ybase = key->totkey * (CHANNELHEIGHT + CHANNELSKIP);
-    num = (int) ((ybase - y) / (CHANNELHEIGHT+CHANNELSKIP));
+    num = (int) ((ybase - y + CHANNELHEIGHT/2) / (CHANNELHEIGHT+CHANNELSKIP));
 
     return (num + 1);
 }
index f0e725837f3683900b80bdb8ce6ed60bf385abee..cbea6a107c4e6f53e9e91d6c19396bf29a7c22b7 100644 (file)
@@ -341,6 +341,8 @@ static void convert_nla(short mval[2])
        bActionStrip *strip, *nstrip;
        /* Find out what strip we're over */
        ymax = count_nla_levels() * (NLACHANNELSKIP+NLACHANNELHEIGHT);
+       ymax+= NLACHANNELHEIGHT/2;
+       
        areamouseco_to_ipoco(G.v2d, mval, &x, &y);
        
        for (base=G.scene->base.first; base; base=base->next){
@@ -485,8 +487,9 @@ static void add_nlablock(short mval[2])
        areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax);
 
        ymax = count_nla_levels();      
-       ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
-       
+       ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax+= NLACHANNELHEIGHT/2;
+
        for (base=G.scene->base.first; base; base=base->next){
                /* Handle object ipo selection */
                if (nla_filter(base, 0)){
@@ -560,23 +563,22 @@ static void mouse_nlachannels(short mval[2])
 //     bActionChannel *chan;
        bConstraintChannel *conchan=NULL;
        bActionStrip *strip;
-       float   click;
+       float   click, x,y;
        int             wsize;
        int             sel;
        Base    *base;
        
        wsize = (count_nla_levels ()*(NLACHANNELHEIGHT+NLACHANNELSKIP));
+       wsize+= NLACHANNELHEIGHT/2;
 
-
-       click = (wsize-(mval[1]+G.v2d->cur.ymin));
-       click += NLACHANNELHEIGHT/2;
-       click /= (NLACHANNELHEIGHT+NLACHANNELSKIP);
+    areamouseco_to_ipoco(G.v2d, mval, &x, &y);
+    click = ((wsize - y) / (NLACHANNELHEIGHT+NLACHANNELSKIP));
 
        if (click<0)
                return;
 
        for (base = G.scene->base.first; base; base=base->next){
-               if (nla_filter(base, 0)){
+               if (nla_filter(base, 0)) {
                        /* See if this is a base selected */
                        if ((int)click==0)
                                break;
@@ -644,8 +646,8 @@ static void mouse_nlachannels(short mval[2])
        }
        
        /* Handle object strip selection */
-       else if (base)
-       {
+       else if (base) {
+               
                /* Choose the mode */
                if (base->flag & SELECT)
                        sel = 0;
@@ -653,18 +655,18 @@ static void mouse_nlachannels(short mval[2])
                        sel =1;
                
                /* Channel names clicking */
-               if (G.qual & LR_SHIFTKEY){
+               if (G.qual & LR_SHIFTKEY) {
        //              select_poseelement_by_name(chan->name, !(chan->flag & ACHAN_SELECTED));
-                       if (base->flag & SELECT){
+                       if (base->flag & SELECT) {
                                base->flag &= ~SELECT;
                //              hilight_channel(act, chan, 0);
                        }
-                       else{
+                       else {
                                base->flag |= SELECT;
                //              hilight_channel(act, chan, 1);
                        }
                }
-               else{
+               else {
                        deselect_nlachannels (0);       // Auto clear
                        base->flag |= SELECT;
                //      hilight_channel(act, chan, 1);
@@ -1223,8 +1225,8 @@ static void mouse_nla(int selectmode)
        getmouseco_areawin (mval);
        
        /* Try object ipo selection */
-       base=get_nearest_nlachannel_ob_key(&selx, &sel);
-       if (base){
+       base= get_nearest_nlachannel_ob_key(&selx, &sel);
+       if (base) {
                if (selectmode == SELECT_REPLACE){
                        deselect_nlachannel_keys(0);
                        selectmode = SELECT_ADD;
@@ -1244,14 +1246,14 @@ static void mouse_nla(int selectmode)
        }
 
        /* Try action ipo selection */
-       act=get_nearest_nlachannel_ac_key(&selx, &sel);
-       if (act){
+       act= get_nearest_nlachannel_ac_key(&selx, &sel);
+       if (act) {
                if (selectmode == SELECT_REPLACE){
                        deselect_nlachannel_keys(0);
                        selectmode = SELECT_ADD;
                }
                
-               for (chan=act->chanbase.first; chan; chan=chan->next){
+               for (chan=act->chanbase.first; chan; chan=chan->next) {
                        select_ipo_key(chan->ipo, selx, selectmode);
                        /* Try action constraint selection */
                        for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next)
@@ -1265,7 +1267,7 @@ static void mouse_nla(int selectmode)
        }
        
        /* Try nla strip selection */
-       base=get_nearest_nlastrip(&rstrip, &sel);
+       base= get_nearest_nlastrip(&rstrip, &sel);
        if (base){
                if (!(G.qual & LR_SHIFTKEY)){
                        deselect_nlachannel_keys(0);
@@ -1308,6 +1310,7 @@ static Base *get_nearest_nlastrip (bActionStrip **rstrip, short *sel)
        
        ymax = count_nla_levels();
        ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax+= NLACHANNELHEIGHT/2;
        
        for (base = G.scene->base.first; base; base=base->next){
                if (nla_filter(base, 0)){
@@ -1384,7 +1387,8 @@ static Base *get_nearest_nlachannel_ob_key (float *index, short *sel)
        
        ymax = count_nla_levels();
        
-       ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax+= NLACHANNELHEIGHT/2;
        
        *sel=0;
        
@@ -1494,7 +1498,8 @@ static bAction *get_nearest_nlachannel_ac_key (float *index, short *sel)
        
        ymax = count_nla_levels();
        
-       ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax*= (NLACHANNELHEIGHT + NLACHANNELSKIP);
+       ymax+= NLACHANNELHEIGHT/2;
        
        *sel=0;
        
index 04e07bb5b5af6c53825bacae056210f316cfd2ea..d446bc2ec248b16229815d7d4e4ab0fc184000df 100644 (file)
@@ -6684,7 +6684,6 @@ void rightmouse_transform(void)
 
 
 void single_object_users(int flag)     
-       /* after this call clear_id_newpoins() */
 {
        Base *base;
        Object *ob, *obn;
@@ -7078,6 +7077,8 @@ void single_user(void)
        
        if(G.scene->id.lib) return;
 
+       clear_id_newpoins();
+       
        nr= pupmenu("Make Single User%t|Object|Object & ObData|Object & ObData & Materials+Tex|Materials+Tex");
        if(nr>0) {
        
index 858d2ddf115db52894e12a0b6d0ee7b1497a0438..8dfea4ff602ef0366024d7b2321862d761c3bc73 100644 (file)
@@ -3014,21 +3014,21 @@ void drawscredge_area(ScrArea *sa)
        cpack(0x0);
        
        /* right border area */
-       if(sa->headertype==HEADERTOP) sdrawline(x2, y1, x2, y2-SCR_ROUND);
-       else if(sa->headertype==HEADERDOWN) sdrawline(x2, y1+SCR_ROUND, x2, y2);
+       if(sa->headertype==HEADERTOP) sdrawline(x2, y1, x2, y2-SCR_ROUND+1);
+       else if(sa->headertype==HEADERDOWN) sdrawline(x2, y1+SCR_ROUND-1, x2, y2);
        else sdrawline(x2, y1, x2, y2);
        
        /* left border area */
-       if(sa->headertype==HEADERTOP) sdrawline(x1, y1, x1, y2-SCR_ROUND);
-       else if(sa->headertype==HEADERDOWN) sdrawline(x1, y1+SCR_ROUND, x1, y2);
+       if(sa->headertype==HEADERTOP) sdrawline(x1, y1, x1, y2-SCR_ROUND+1);
+       else if(sa->headertype==HEADERDOWN) sdrawline(x1, y1+SCR_ROUND-1, x1, y2);
        else sdrawline(x1, y1, x1, y2);
        
        /* top border area */
-       if(sa->headertype==HEADERTOP) sdrawline(x1+SCR_ROUND, y2, x2-SCR_ROUND, y2);
+       if(sa->headertype==HEADERTOP) sdrawline(x1+SCR_ROUND, y2, x2-SCR_ROUND+1, y2);
        else sdrawline(x1, y2, x2, y2);
        
        /* bottom border area */
-       if(sa->headertype==HEADERDOWN) sdrawline(x1+SCR_ROUND, y1, x2-SCR_ROUND, y1);
+       if(sa->headertype==HEADERDOWN) sdrawline(x1+SCR_ROUND, y1, x2-SCR_ROUND+1, y1);
        else sdrawline(x1, y1, x2, y1);
        
 }
index 38d41a37d7eb0c65e6543292e84387e7ec27d8b8..b414b1b74f366fef1b84011acc34b22d26219dda 100644 (file)
@@ -1363,8 +1363,6 @@ void outliner_mouse_event(ScrArea *sa, short event)
        short mval[2];
        
        getmouseco_areawin(mval);
-       fmval[0]= mval[0];
-       fmval[1]= mval[1];
        areamouseco_to_ipoco(&soops->v2d, mval, fmval, fmval+1);
        
        for(te= soops->tree.first; te; te= te->next) {
@@ -1494,15 +1492,11 @@ void outliner_select(struct ScrArea *sa )
        short mval[2], yo=-1, selecting= -1;
        
        getmouseco_areawin(mval);
-       fmval[0]= mval[0];
-       fmval[1]= mval[1];
        areamouseco_to_ipoco(&so->v2d, mval, fmval, fmval+1);
        y1= fmval[1];
 
        while (get_mbut() & R_MOUSE) {
                getmouseco_areawin(mval);
-               fmval[0]= mval[0];
-               fmval[1]= mval[1];
                areamouseco_to_ipoco(&so->v2d, mval, fmval, fmval+1);
                y2= fmval[1];
                if(yo!=mval[1]) {