2.5
authorTon Roosendaal <ton@blender.org>
Wed, 20 May 2009 16:55:28 +0000 (16:55 +0000)
committerTon Roosendaal <ton@blender.org>
Wed, 20 May 2009 16:55:28 +0000 (16:55 +0000)
Node editor:
- Crash could occur on ALT+LMB remove link lines (read free'd mem)
- Button labels were handled as full buttons, disabling node usage
  quite a lot, like drag, select, or create links.
  (Caused by making all node labels buttons)

Brecht: old UI_NO_HILITE can be depricated, it was for bad overdraw
issues. I guess it's OK to not handle Label buttons at all...

source/blender/editors/interface/interface_handlers.c
source/blender/editors/space_node/node_edit.c

index 65752423dce6f14bf0cd8721c3984d6384a0b99f..ea5eb354b54c876aba29d399b2b150699b37ec7f 100644 (file)
@@ -2843,6 +2843,8 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y)
                for(but=block->buttons.first; but; but= but->next) {
                        if(but->flag & UI_NO_HILITE)
                                continue;
+                       if(but->type==LABEL)
+                               continue;
 
                        if(ui_but_contains_pt(but, mx, my))
                                /* give precedence to already activated buttons */
index 5ee7326cd2f4f79c41330725d881bf38db3f6162..56d7a649eb11a476b722d067f08d25bb91020087 100644 (file)
@@ -2118,7 +2118,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
        if(i>1) {
                bNodeLink *link, *next;
                
-               for(link= snode->edittree->links.first; link; link= link->next) {
+               for(link= snode->edittree->links.first; link; link= next) {
                        next= link->next;
                        
                        if(cut_links_intersect(link, mcoords, i)) {