Revision: 17972
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17972
Author:   blendix
Date:     2008-12-20 15:15:58 +0100 (Sat, 20 Dec 2008)

Log Message:
-----------
2.5:
- fix crash opening submenus
- fix disappearing main menu when going into submenu

Modified Paths:
--------------
    
branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
    
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c

Modified: 
branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
   2008-12-20 13:29:35 UTC (rev 17971)
+++ 
branches/blender2.5/blender/source/blender/editors/interface/interface_handlers.c
   2008-12-20 14:15:58 UTC (rev 17972)
@@ -3499,6 +3499,7 @@
 
        but= ui_but_find_activated(ar);
        data= but->active;
+       submenu= data->menu;
 
        if(submenu->menuretval) {
                /* first decide if we want to close our own menu cascading, if

Modified: 
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c
===================================================================
--- 
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c
   2008-12-20 13:29:35 UTC (rev 17971)
+++ 
branches/blender2.5/blender/source/blender/windowmanager/intern/wm_event_system.c
   2008-12-20 14:15:58 UTC (rev 17972)
@@ -159,12 +159,14 @@
        ScrArea *sa;
        ARegion *ar;
        
-       for(sa= screen->areabase.first; sa; sa= sa->next) {
-               for(ar=sa->regionbase.first; ar; ar= ar->next) {
-                       if( BLI_isect_rcti(dirty, &ar->winrct, NULL) )
+       for(ar= screen->regionbase.first; ar; ar= ar->next)
+               if(BLI_isect_rcti(dirty, &ar->winrct, NULL))
+                       ar->do_draw= 1;
+
+       for(sa= screen->areabase.first; sa; sa= sa->next)
+               for(ar= sa->regionbase.first; ar; ar= ar->next)
+                       if(BLI_isect_rcti(dirty, &ar->winrct, NULL))
                                ar->do_draw= 1;
-               }
-       }
 }
 
 /* all the overlay management, menus, actionzones, region tabs, etc */
@@ -174,7 +176,7 @@
        bScreen *screen= CTX_wm_screen(C);
        
        /* flush redraws of screen regions (menus) down */
-       for(ar= screen->regionbase.first; ar; ar= ar->next) {
+       for(ar= screen->regionbase.last; ar; ar= ar->prev) {
                if(ar->swinid && ar->do_draw) {
                        wm_flush_regions(screen, &ar->winrct);
                }


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to