New Outliner "Blender File" option: the first entry couldn't be closed/re-opened.

This commit is contained in:
Ton Roosendaal
2012-12-22 17:32:56 +00:00
parent 82bbf467ca
commit aef4910eaf

View 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);