[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35732] trunk/blender/source/blender/ editors/screen/screen_ops.c: IRC bugreport:

Ton Roosendaal ton at blender.org
Wed Mar 23 17:36:41 CET 2011


Revision: 35732
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35732
Author:   ton
Date:     2011-03-23 16:36:41 +0000 (Wed, 23 Mar 2011)
Log Message:
-----------
IRC bugreport:

Splitting/joining editors (areas) was possible in full-screen mode.
That's not possible, crashes on going back to previous.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/screen/screen_ops.c

Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c	2011-03-23 16:05:35 UTC (rev 35731)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c	2011-03-23 16:36:41 UTC (rev 35732)
@@ -108,6 +108,17 @@
 	return 1;
 }
 
+static int screen_active_editable(bContext *C)
+{
+	if(ED_operator_screenactive(C)) {
+		/* no full window splitting allowed */
+		if(CTX_wm_screen(C)->full != SCREENNORMAL)
+			return 0;
+		return 1;
+	}
+	return 0;
+}
+
 /* when mouse is over area-edge */
 int ED_operator_screen_mainwinactive(bContext *C)
 {
@@ -1263,6 +1274,10 @@
 	sAreaSplitData *sd;
 	int dir;
 	
+	/* no full window splitting allowed */
+	if(CTX_wm_screen(C)->full != SCREENNORMAL)
+		return OPERATOR_CANCELLED;
+	
 	if(event->type==EVT_ACTIONZONE_AREA) {
 		sActionzoneData *sad= event->customdata;
 		
@@ -1270,7 +1285,6 @@
 			return OPERATOR_PASS_THROUGH;
 		}
 		
-		
 		/* verify *sad itself */
 		if(sad==NULL || sad->sa1==NULL || sad->az==NULL)
 			return OPERATOR_PASS_THROUGH;
@@ -1299,10 +1313,6 @@
 		ScrEdge *actedge;
 		int x, y;
 		
-		/* no full window splitting allowed */
-		if(CTX_wm_area(C) && CTX_wm_area(C)->full)
-			return OPERATOR_CANCELLED;
-		
 		/* retrieve initial mouse coord, so we can find the active edge */
 		if(RNA_property_is_set(op->ptr, "mouse_x"))
 			x= RNA_int_get(op->ptr, "mouse_x");
@@ -1471,7 +1481,7 @@
 	ot->invoke= area_split_invoke;
 	ot->modal= area_split_modal;
 	
-	ot->poll= ED_operator_screenactive;
+	ot->poll= screen_active_editable;
 	ot->flag= OPTYPE_BLOCKING;
 	
 	/* rna */
@@ -2210,7 +2220,7 @@
 	ot->exec= area_join_exec;
 	ot->invoke= area_join_invoke;
 	ot->modal= area_join_modal;
-	ot->poll= ED_operator_screenactive;
+	ot->poll= screen_active_editable;
 	
 	ot->flag= OPTYPE_BLOCKING;
 	




More information about the Bf-blender-cvs mailing list