Revision: 34467
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34467
Author:   jhk
Date:     2011-01-23 13:52:24 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
Panels that have the "no header" flag set are now always drawn first in a tab 
regardless of the order they were registered.
* This is a quick and simple workaround until we can define proper ordering for 
the panels.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_ui.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c       2011-01-23 
13:34:36 UTC (rev 34466)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c       2011-01-23 
13:52:24 UTC (rev 34467)
@@ -213,8 +213,20 @@
        pt->draw= (have_function[1])? panel_draw: NULL;
        pt->draw_header= (have_function[2])? panel_draw_header: NULL;
 
-       BLI_addtail(&art->paneltypes, pt);
+       /* XXX use "no header" flag for some ordering of panels until we have 
real panel ordering */
+       if(pt->flag & PNL_NO_HEADER) {
+               PanelType *pth = art->paneltypes.first;
+               while(pth && pth->flag & PNL_NO_HEADER)
+                       pth=pth->next;
 
+               if(pth)
+                       BLI_insertlinkbefore(&art->paneltypes, pth, pt);
+               else
+                       BLI_addtail(&art->paneltypes, pt);
+       }
+       else
+               BLI_addtail(&art->paneltypes, pt);
+
        /* update while blender is running */
        if(C)
                WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to