Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2007-02-01 17:14:07 +0300
committerTon Roosendaal <ton@blender.org>2007-02-01 17:14:07 +0300
commit5cda9df1499763d3d8c66176ac50e93244825124 (patch)
tree2e91a4711e6becb426635c739a496a56c5e93a42 /source/blender/src/toolbox.c
parent80315d0c9bc6683e06b544e04889ecdff9892426 (diff)
Bugfix #5897
Using multiple levels deep referenced groups (group in group) messed up the add-group menu in toolbox
Diffstat (limited to 'source/blender/src/toolbox.c')
-rw-r--r--source/blender/src/toolbox.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index adcc6f68b4d..f979e807925 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -1758,6 +1758,7 @@ static void tag_groups_for_toolbox(void)
}
/* helper for create group menu */
+/* note that group id.flag was set */
static int count_group_libs(void)
{
Group *group;
@@ -1768,9 +1769,11 @@ static int count_group_libs(void)
lib->id.flag |= LIB_DOIT;
for(group= G.main->group.first; group; group= group->id.next) {
- if(group->id.lib && (group->id.lib->id.flag & LIB_DOIT)) {
- group->id.lib->id.flag &= ~LIB_DOIT;
- tot++;
+ if(group->id.flag & LIB_DOIT) {
+ if(group->id.lib && (group->id.lib->id.flag & LIB_DOIT)) {
+ group->id.lib->id.flag &= ~LIB_DOIT;
+ tot++;
+ }
}
}
return tot;
@@ -1816,7 +1819,7 @@ static TBitem *create_group_all_sublevels(ListBase *storage)
Link *link;
TBitem *groupmenu, *gm;
int a;
- int totlevel= count_group_libs();
+ int totlevel= 0;
int totlocal= 0;
/* we add totlevel + local groups entries */
@@ -1824,6 +1827,9 @@ static TBitem *create_group_all_sublevels(ListBase *storage)
/* let's skip group-in-group */
tag_groups_for_toolbox();
+ /* this call checks for skipped group-in-groups */
+ totlevel= count_group_libs();
+
for(group= G.main->group.first; group; group= group->id.next)
if(group->id.flag & LIB_DOIT)
if(group->id.lib==NULL)