New Outliner "Blender File" option: the first entry couldn't be closed/re-opened.
authorTon Roosendaal <ton@blender.org>
Sat, 22 Dec 2012 17:32:56 +0000 (17:32 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 22 Dec 2012 17:32:56 +0000 (17:32 +0000)
source/blender/editors/space_outliner/outliner_tree.c

index 1cfb85afdaeaee23bef34030df9110d7897d4249..ddbc49bf9953d82c9a544854bf2e60fb422c6255 100644 (file)
@@ -1492,8 +1492,8 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
        if (soops->outlinevis == SO_LIBRARIES) {
                Library *lib;
                
-               /* current file first */
-               ten = outliner_add_element(soops, &soops->tree, NULL, NULL, TSE_ID_BASE, 0);
+               /* current file first - mainvar provides tselem with unique pointer - not used */
+               ten = outliner_add_element(soops, &soops->tree, mainvar, NULL, TSE_ID_BASE, 0);
                ten->name = "Current File";
 
                tselem = TREESTORE(ten);
@@ -1511,6 +1511,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
                }
                /* make hierarchy */
                ten = soops->tree.first;
+               ten= ten->next; /* first one is main */
                while (ten) {
                        TreeElement *nten = ten->next, *par;
                        tselem = TREESTORE(ten);