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:
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r--source/blender/editors/space_graph/graph_edit.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 5546682e470..274c06bf871 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -214,7 +214,8 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
/* ****************** View-All Operator ****************** */
-static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles)
+static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles,
+ const int smooth_viewtx)
{
bAnimContext ac;
rctf cur_new;
@@ -231,7 +232,7 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i
BLI_rctf_scale(&cur_new, 1.1f);
- UI_view2d_smooth_view(C, ac.ar, &cur_new);
+ UI_view2d_smooth_view(C, ac.ar, &cur_new, smooth_viewtx);
return OPERATOR_FINISHED;
}
@@ -240,18 +241,20 @@ static int graphkeys_viewall(bContext *C, const short do_sel_only, const short i
static int graphkeys_viewall_exec(bContext *C, wmOperator *op)
{
- short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* whole range */
- return graphkeys_viewall(C, FALSE, include_handles);
+ return graphkeys_viewall(C, false, include_handles, smooth_viewtx);
}
static int graphkeys_view_selected_exec(bContext *C, wmOperator *op)
{
- short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const short include_handles = RNA_boolean_get(op->ptr, "include_handles");
+ const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
/* only selected */
- return graphkeys_viewall(C, TRUE, include_handles);
+ return graphkeys_viewall(C, true, include_handles, smooth_viewtx);
}
void GRAPH_OT_view_all(wmOperatorType *ot)