Fix #31514: Open blends via drag-n'-drop doesn't work when splash screen is on

Do not block EVT_DROP event from popup handler.
Not ideal solution sine it'll be much nicer to cleanup event handling order,
but should be acceptable for now.
This commit is contained in:
Sergey Sharybin
2012-05-25 14:57:17 +00:00
parent 352cd241a3
commit d236f8d450

View File

@@ -6574,7 +6574,16 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata)
/* delayed apply callbacks */
ui_apply_but_funcs_after(C);
/* we block all events, this is modal interaction */
if (event->type == EVT_DROP) {
/* if we're handling drop event we'll want it to be handled by popup callee as well,
* so it'll be possible to perform such operations as opening .blend files by dropping
* them into blender even if there's opened popup like splash screen (sergey)
*/
return WM_UI_HANDLER_CONTINUE;
}
/* we block all events, this is modal interaction, except for drop events which is described above */
return WM_UI_HANDLER_BREAK;
}