projects
/
blender-staging.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16c783d
)
Num-slider buts and CTRL didn't work when range was > 1.0
author
Ton Roosendaal <ton@blender.org>
Fri, 7 May 2004 19:56:26 +0000
(19:56 +0000)
committer
Ton Roosendaal <ton@blender.org>
Fri, 7 May 2004 19:56:26 +0000
(19:56 +0000)
source/blender/src/interface.c
patch
|
blob
|
history
diff --git
a/source/blender/src/interface.c
b/source/blender/src/interface.c
index dac638be0d4f30ddde7f7170b7c0888e942e7dd0..fa4b3fd4a00916f23cf273904d3d1eebbd65136f 100644
(file)
--- a/
source/blender/src/interface.c
+++ b/
source/blender/src/interface.c
@@
-1677,15
+1677,17
@@
static int ui_do_but_SLI(uiBut *but)
if(qual & LR_CTRLKEY) {
if(tempf==but->min || tempf==but->max);
else if( but->pointype==FLO ) {
- if(qual & LR_SHIFTKEY) tempf= floor(tempf*100.0)/100.0;
- else tempf= floor(tempf*10.0)/10.0;
+
+ if(but->max-but->min < 2.10) tempf= 0.1*floor(10*tempf);
+ else if(but->max-but->min < 21.0) tempf= floor(tempf);
+ else tempf= 10.0*floor(tempf/10.0);
}
else {
temp= 10*(temp/10);
tempf= temp;
}
}
-
+
value= ui_get_but_val(but);
lvalue= (int) value;