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/graph_ops.c')
-rw-r--r--source/blender/editors/space_graph/graph_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 74114f8ca9d..4409a5b180e 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -37,6 +37,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLI_math_base.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -123,7 +124,7 @@ static void graphview_cursor_setprops(bContext *C, wmOperator *op, const wmEvent
/* store the values in the operator properties */
/* frame is rounded to the nearest int, since frames are ints */
- RNA_int_set(op->ptr, "frame", (int)floor(viewx + 0.5f));
+ RNA_int_set(op->ptr, "frame", iroundf(viewx));
RNA_float_set(op->ptr, "value", viewy);
}