[Bf-blender-cvs] [98af6c8ce30] soc-2019-outliner: Outliner cleanup: openclose and scroll page
Nathan Craddock
noreply at git.blender.org
Thu Aug 1 03:19:45 CEST 2019
Commit: 98af6c8ce30272f40f5f3b832797b18eb44e15db
Author: Nathan Craddock
Date: Wed Jul 31 13:50:12 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB98af6c8ce30272f40f5f3b832797b18eb44e15db
Outliner cleanup: openclose and scroll page
Simplify code and operator properties
===================================================================
M source/blender/editors/space_outliner/outliner_edit.c
===================================================================
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 965d7168d00..7cc02da74b9 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -267,7 +267,7 @@ void OUTLINER_OT_item_openclose(wmOperatorType *ot)
ot->poll = ED_operator_outliner_active;
- RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items");
+ RNA_def_boolean(ot->srna, "all", false, "All", "Close or open all items");
}
/* -------------------------------------------------------------------- */
@@ -1368,10 +1368,7 @@ static int outliner_scroll_page_exec(bContext *C, wmOperator *op)
ARegion *ar = CTX_wm_region(C);
int size_y = BLI_rcti_size_y(&ar->v2d.mask) + 1;
- bool up = false;
- if (RNA_boolean_get(op->ptr, "up")) {
- up = true;
- }
+ bool up = RNA_boolean_get(op->ptr, "up");
/* Keep view within outliner tree bounds */
int y_min = MIN2(ar->v2d.tot.ymin, ar->v2d.cur.ymin);
More information about the Bf-blender-cvs
mailing list