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:
authorJulian Eisel <eiseljulian@gmail.com>2016-10-16 22:41:10 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-10-16 23:23:50 +0300
commitd1a35b7a085ac299feafef7c785c9c7565da20f4 (patch)
tree005ceb7d7a07258efe104567eefbe6aaed83d462 /source/blender/editors/space_outliner/outliner_select.c
parentfa39ec9e467d619a6ee98d3416bf0e4b7ebc4c69 (diff)
Fix outliner items sometimes not opening
Own mistake in 9a9a663f40d55. Guessed there is a case where we have to rebuild the tree but everything seemed fine... It didn't work in display modes like "Data-Blocks".
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 101ad235428..a9f834c509f 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -934,7 +934,7 @@ int outliner_item_activate_or_toggle_closed(bContext *C, int x, int y, bool exte
SpaceOops *soops = CTX_wm_space_outliner(C);
TreeElement *te;
float view_mval[2];
- bool changed = false;
+ bool changed = false, rebuild_tree = false;
UI_view2d_region_to_view(&ar->v2d, x, y, &view_mval[0], &view_mval[1]);
@@ -948,6 +948,7 @@ int outliner_item_activate_or_toggle_closed(bContext *C, int x, int y, bool exte
else if (outliner_item_is_co_within_close_toggle(te, view_mval[0])) {
outliner_item_toggle_closed(te, extend);
changed = true;
+ rebuild_tree = true;
}
else {
/* the row may also contain children, if one is hovered we want this instead of current te */
@@ -959,7 +960,10 @@ int outliner_item_activate_or_toggle_closed(bContext *C, int x, int y, bool exte
}
if (changed) {
- soops->storeflag |= SO_TREESTORE_REDRAW; /* only needs to redraw, no rebuild */
+ if (!rebuild_tree) {
+ /* only needs to redraw, no rebuild */
+ soops->storeflag |= SO_TREESTORE_REDRAW;
+ }
ED_undo_push(C, "Outliner selection change");
ED_region_tag_redraw(ar);
}