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>2010-12-20 18:39:00 +0300
committerTon Roosendaal <ton@blender.org>2010-12-20 18:39:00 +0300
commitfb586da6904c352d9f05197ad3c87b5331b77e25 (patch)
tree44352bd80ac92c1a6cda7fc54a92402a0753e383 /source/blender/editors/space_outliner/outliner.c
parentc0882efc8ea0e9a839f33a37d272387fde409e58 (diff)
Bugfix #25313
Outliner "show active" now also works for elements hidden in closed items. (Coordinates were not set)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner.c')
-rw-r--r--source/blender/editors/space_outliner/outliner.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 332567fba99..98ebeff9c61 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -4559,6 +4559,21 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa
}
+/* closed tree element */
+static void outliner_set_coord_tree_element(SpaceOops *soops, TreeElement *te, int startx, int *starty)
+{
+ TreeElement *ten;
+
+ /* store coord and continue, we need coordinates for elements outside view too */
+ te->xs= (float)startx;
+ te->ys= (float)(*starty);
+
+ for(ten= te->subtree.first; ten; ten= ten->next) {
+ outliner_set_coord_tree_element(soops, ten, startx+OL_X, starty);
+ }
+}
+
+
static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, int startx, int *starty)
{
TreeElement *ten;
@@ -4713,13 +4728,18 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
te->ys= (float)*starty;
te->xend= startx+offsx;
- *starty-= OL_H;
-
if((tselem->flag & TSE_CLOSED)==0) {
- for(ten= te->subtree.first; ten; ten= ten->next) {
+ *starty-= OL_H;
+
+ for(ten= te->subtree.first; ten; ten= ten->next)
outliner_draw_tree_element(C, block, scene, ar, soops, ten, startx+OL_X, starty);
- }
}
+ else {
+ for(ten= te->subtree.first; ten; ten= ten->next)
+ outliner_set_coord_tree_element(soops, te, startx, starty);
+
+ *starty-= OL_H;
+ }
}
static void outliner_draw_hierarchy(SpaceOops *soops, ListBase *lb, int startx, int *starty)