[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59803] branches/soc-2013-ui_replay/source /blender/editors/interface/interface_panel.c: Hidden panels did not survive a save and load.

Vincent Akkermans vincent at ack-err.net
Wed Sep 4 16:58:18 CEST 2013


Revision: 59803
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59803
Author:   ack-err
Date:     2013-09-04 14:58:18 +0000 (Wed, 04 Sep 2013)
Log Message:
-----------
Hidden panels did not survive a save and load. This fixes that by making sure the panels' types are set.

Modified Paths:
--------------
    branches/soc-2013-ui_replay/source/blender/editors/interface/interface_panel.c

Modified: branches/soc-2013-ui_replay/source/blender/editors/interface/interface_panel.c
===================================================================
--- branches/soc-2013-ui_replay/source/blender/editors/interface/interface_panel.c	2013-09-04 14:40:04 UTC (rev 59802)
+++ branches/soc-2013-ui_replay/source/blender/editors/interface/interface_panel.c	2013-09-04 14:58:18 UTC (rev 59803)
@@ -204,8 +204,10 @@
 	
 	for (pa = ar->panels.first; pa; pa = pa->next)
 		if (strncmp(pa->panelname, pt->idname, UI_MAX_NAME_STR) == 0)
-			if (strncmp(pa->tabname, pt->idname, UI_MAX_NAME_STR) == 0)
+			if (strncmp(pa->tabname, pt->idname, UI_MAX_NAME_STR) == 0) {
+				pa->type = pt;
 				break;
+			}
 	
 	return pa;
 }
@@ -225,10 +227,7 @@
 	
 	newpanel = (pa == NULL);
 
-	if (!newpanel) {
-		pa->type = pt;
-	}
-	else {
+	if (newpanel) {
 		/* new panel */
 		pa = MEM_callocN(sizeof(Panel), "new panel");
 		pa->type = pt;




More information about the Bf-blender-cvs mailing list