[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54141] trunk/blender/source/blender/ editors/interface/interface_panel.c: Fix for a nasty glicth found by Irie Shinsuke in Freestyle branch.

Bastien Montagne montagne29 at wanadoo.fr
Mon Jan 28 09:58:25 CET 2013


Revision: 54141
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54141
Author:   mont29
Date:     2013-01-28 08:58:20 +0000 (Mon, 28 Jan 2013)
Log Message:
-----------
Fix for a nasty glicth found by Irie Shinsuke in Freestyle branch.

Headerless panels are not supposed to be closed ever. But if user saves a blend with a stardard panel closed, then dev decides to make this panel headerless, when user open again its blend, the panel is closed and has no more header, so it becomes invisible!

This commit simply checks, at draw time, that a headerless panel is never closed (and repoen it if necessary)!

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

Modified: trunk/blender/source/blender/editors/interface/interface_panel.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_panel.c	2013-01-28 06:56:47 UTC (rev 54140)
+++ trunk/blender/source/blender/editors/interface/interface_panel.c	2013-01-28 08:58:20 UTC (rev 54141)
@@ -247,6 +247,14 @@
 		}
 	}
 
+	/* Do not allow closed panels without headers! Else user could get "disappeared" UI! */
+	if ((pt->flag & PNL_NO_HEADER) && (pa->flag & PNL_CLOSED)) {
+		pa->flag &= ~PNL_CLOSED;
+		/* Force update of panels' positions! */
+		pa->sizex = 0;
+		pa->sizey = 0;
+	}
+
 	BLI_strncpy(pa->drawname, drawname, UI_MAX_NAME_STR);
 
 	/* if a new panel is added, we insert it right after the panel




More information about the Bf-blender-cvs mailing list