Menu handlers need to return OUT when clicking outside, not OK

Caused crashes with window type selector and a slew of other unwanted behaviors.
This commit is contained in:
2009-12-02 19:32:21 +00:00
parent 7706261e79
commit bce687ef36

View File

@@ -4713,7 +4713,7 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
if(ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val==KM_PRESS)
if(saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y))
menu->menuretval= UI_RETURN_OK;
menu->menuretval= UI_RETURN_OUT;
}
if(menu->menuretval);