[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47021] trunk/blender/source/blender/ editors/interface/interface_handlers.c: Fix #31514: Open blends via drag-n' -drop doesn't work when splash screen is on

Sergey Sharybin sergey.vfx at gmail.com
Fri May 25 16:57:17 CEST 2012


Revision: 47021
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47021
Author:   nazgul
Date:     2012-05-25 14:57:17 +0000 (Fri, 25 May 2012)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c	2012-05-25 14:08:50 UTC (rev 47020)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c	2012-05-25 14:57:17 UTC (rev 47021)
@@ -6574,7 +6574,16 @@
 	/* 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;
 }
 




More information about the Bf-blender-cvs mailing list