[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25234] trunk/blender/source/blender: Various more screen-related fixes including:

Matt Ebb matt at mke3.net
Wed Dec 9 07:55:17 CET 2009


Revision: 25234
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25234
Author:   broken
Date:     2009-12-09 07:55:16 +0100 (Wed, 09 Dec 2009)

Log Message:
-----------
Various more screen-related fixes including:
[#20271] File Browser - Wont show when area is fullscreen

Modified Paths:
--------------
    trunk/blender/source/blender/editors/screen/screen_edit.c
    trunk/blender/source/blender/makesdna/DNA_screen_types.h

Modified: trunk/blender/source/blender/editors/screen/screen_edit.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_edit.c	2009-12-09 04:51:35 UTC (rev 25233)
+++ trunk/blender/source/blender/editors/screen/screen_edit.c	2009-12-09 06:55:16 UTC (rev 25234)
@@ -1468,7 +1468,7 @@
 				// default. So use the old headertype instead
 			
 			area_copy_data(old, sa, 1);	/*  1 = swap spacelist */
-			
+			if (sa->flag |= AREA_TEMP_INFO) sa->flag &= ~AREA_TEMP_INFO;
 			old->full= NULL;
 			
 			/* animtimer back */
@@ -1502,7 +1502,7 @@
 		/* returns the top small area */
 		newa= area_split(win, sc, (ScrArea *)sc->areabase.first, 'h', 0.99f);
 		ED_area_newspace(C, newa, SPACE_INFO);
-
+		
 		/* use random area when we have no active one, e.g. when the
 		   mouse is outside of the window and we open a file browser */
 		if(!sa)
@@ -1511,11 +1511,12 @@
 		/* copy area */
 		newa= newa->prev;
 		area_copy_data(newa, sa, 1);	/* 1 = swap spacelist */
+		sa->flag |= AREA_TEMP_INFO;
 
 		sa->full= oldscreen;
 		newa->full= oldscreen;
 		newa->next->full= oldscreen; // XXX
-
+		
 		ED_screen_set(C, sc);
 	}
 
@@ -1530,13 +1531,26 @@
 int ED_screen_full_newspace(bContext *C, ScrArea *sa, int type)
 {
 	wmWindow *win= CTX_wm_window(C);
+	bScreen *screen= CTX_wm_screen(C);
 	ScrArea *newsa= NULL;
 
-	if(!sa || sa->full==0)
+	if(!sa || sa->full==0) {
 		newsa= ed_screen_fullarea(C, win, sa);
-	if(!newsa)
-		newsa= sa;
-
+	}
+	
+	if(!newsa) {
+		if (sa->full) {
+			/* if this has been called from the temporary info header generated in
+			 * temp fullscreen layouts, find the correct fullscreen area to change
+			 * to create a new space inside */
+			for (newsa = screen->areabase.first; newsa; newsa=newsa->next) {
+				if (!(sa->flag & AREA_TEMP_INFO))
+					break;
+			}
+		} else
+			newsa= sa;
+	}
+	
 	ED_area_newspace(C, newsa, type);
 	
 	return 1;
@@ -1567,10 +1581,14 @@
 			SpaceImage *sima= sa->spacedata.first;
 			if (sima->flag & SI_PREVSPACE)
 				sima->flag &= ~SI_PREVSPACE;
-			if (sima->flag & SI_FULLWINDOW)
+			if (sima->flag & SI_FULLWINDOW) {
 				sima->flag &= ~SI_FULLWINDOW;
-		}
-		ED_screen_full_prevspace(C, sa);
+				ED_screen_full_prevspace(C, sa);
+			}
+		} else if (sl->spacetype == SPACE_FILE) {
+			ED_screen_full_prevspace(C, sa);
+		} else
+			ed_screen_fullarea(C, win, sa);
 	}
 	/* otherwise just tile the area again */
 	else {

Modified: trunk/blender/source/blender/makesdna/DNA_screen_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_screen_types.h	2009-12-09 04:51:35 UTC (rev 25233)
+++ trunk/blender/source/blender/makesdna/DNA_screen_types.h	2009-12-09 06:55:16 UTC (rev 25234)
@@ -170,9 +170,10 @@
 #define WIN_EQUAL		3
 
 /* area->flag */
-#define HEADER_NO_PULLDOWN	1
-#define AREA_FLAG_DRAWJOINTO 2
-#define AREA_FLAG_DRAWJOINFROM 4
+#define HEADER_NO_PULLDOWN		1
+#define AREA_FLAG_DRAWJOINTO	2
+#define AREA_FLAG_DRAWJOINFROM	4
+#define AREA_TEMP_INFO			8
 
 /* If you change EDGEWIDTH, also do the global arrat edcol[]  */
 #define EDGEWIDTH	1





More information about the Bf-blender-cvs mailing list