forked from bartvdbraak/blender
2.5:
- fix crash opening submenus - fix disappearing main menu when going into submenu
This commit is contained in:
parent
5f7ad70811
commit
08db8198c4
@ -3499,6 +3499,7 @@ static int ui_handle_menu_closed_submenu(bContext *C, wmEvent *event, uiMenuBloc
|
|||||||
|
|
||||||
but= ui_but_find_activated(ar);
|
but= ui_but_find_activated(ar);
|
||||||
data= but->active;
|
data= but->active;
|
||||||
|
submenu= data->menu;
|
||||||
|
|
||||||
if(submenu->menuretval) {
|
if(submenu->menuretval) {
|
||||||
/* first decide if we want to close our own menu cascading, if
|
/* first decide if we want to close our own menu cascading, if
|
||||||
|
@ -159,12 +159,14 @@ static void wm_flush_regions(bScreen *screen, rcti *dirty)
|
|||||||
ScrArea *sa;
|
ScrArea *sa;
|
||||||
ARegion *ar;
|
ARegion *ar;
|
||||||
|
|
||||||
for(sa= screen->areabase.first; sa; sa= sa->next) {
|
for(ar= screen->regionbase.first; ar; ar= ar->next)
|
||||||
for(ar=sa->regionbase.first; ar; ar= ar->next) {
|
if(BLI_isect_rcti(dirty, &ar->winrct, NULL))
|
||||||
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;
|
ar->do_draw= 1;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* all the overlay management, menus, actionzones, region tabs, etc */
|
/* all the overlay management, menus, actionzones, region tabs, etc */
|
||||||
@ -174,7 +176,7 @@ static void wm_flush_draw_update(bContext *C)
|
|||||||
bScreen *screen= CTX_wm_screen(C);
|
bScreen *screen= CTX_wm_screen(C);
|
||||||
|
|
||||||
/* flush redraws of screen regions (menus) down */
|
/* 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) {
|
if(ar->swinid && ar->do_draw) {
|
||||||
wm_flush_regions(screen, &ar->winrct);
|
wm_flush_regions(screen, &ar->winrct);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user