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:
authorTon Roosendaal <ton@blender.org>2004-07-30 00:50:13 +0400
committerTon Roosendaal <ton@blender.org>2004-07-30 00:50:13 +0400
commitc72675176078c802ff465fea91778790c2988bc8 (patch)
treee02f22e7050abb4b1078b0e74866debb3945d5e2 /source/blender/src/interface.c
parentcfbe0f3119f8552c679deaae68345eb9a17b3f41 (diff)
Attempt #3 (or so) to solve the "weird buggy" hardness slider updates. :)
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r--source/blender/src/interface.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index 54f4708500c..8d2bc86404b 100644
--- a/source/blender/src/interface.c
+++ b/source/blender/src/interface.c
@@ -1721,7 +1721,6 @@ static int ui_do_but_SLI(uiBut *but)
if (redraw) {
pos= 1;
-
ui_set_but_val(but, tempf);
ui_check_but(but);
ui_draw_but(but);
@@ -3534,18 +3533,18 @@ static void ui_set_but_val(uiBut *but, double value)
}
else if( but->pointype==CHA )
- *((char *)poin)= (char)value;
+ *((char *)poin)= (char)floor(value+0.5);
else if( but->pointype==SHO ) {
/* gcc 3.2.1 seems to have problems
* casting a double like 32772.0 to
* a short so we cast to an int, then
to a short */
int gcckludge;
- gcckludge = (int) value;
+ gcckludge = (int) floor(value+0.5);
*((short *)poin)= (short) gcckludge;
}
else if( but->pointype==INT )
- *((int *)poin)= (int)value;
+ *((int *)poin)= (int)floor(value+0.5);
else if( but->pointype==FLO )
*((float *)poin)= value;