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:
authorDalai Felinto <dfelinto@gmail.com>2013-10-31 07:21:20 +0400
committerDalai Felinto <dfelinto@gmail.com>2013-10-31 07:21:20 +0400
commit1cf1984d1c4913024f58cc54cbe1db06eb47738a (patch)
tree21b163aa5ac151353c3369e15ca9c7af58022533
parentbd17d2371f22ed7a677422297f3ce5a1c3df6f40 (diff)
Python ui: increase interface float precision limit from 6 to 7
-rw-r--r--source/blender/editors/interface/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 16e92f2bc18..54fb0fc5c20 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -78,7 +78,7 @@
#include "interface_intern.h"
-#define PRECISION_FLOAT_MAX 6
+#define PRECISION_FLOAT_MAX 7
#define PRECISION_FLOAT_MAX_POW 1000000 /* pow(10, PRECISION_FLOAT_MAX) */
/* avoid unneeded calls to ui_get_but_val */
@@ -443,7 +443,7 @@ void uiExplicitBoundsBlock(uiBlock *block, int minx, int miny, int maxx, int max
static int ui_but_float_precision(uiBut *but, double value)
{
int prec;
- const double pow10_neg[PRECISION_FLOAT_MAX + 1] = {1.0, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001};
+ const double pow10_neg[PRECISION_FLOAT_MAX + 1] = {1.0, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001, 0.0000001};
/* first check if prec is 0 and fallback to a simple default */
if ((prec = (int)but->a2) == -1) {