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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-05-07 23:56:26 +0400
committerTon Roosendaal <ton@blender.org>2004-05-07 23:56:26 +0400
commit83907fc5f73b6634239d891fe2b0dd4be203b86b (patch)
tree5bd76d2491c4531b44747dc868d4e2ed564ecb99 /source
parent16c783d950868baceb4b3909dd18ecdf7ee66629 (diff)
Num-slider buts and CTRL didn't work when range was > 1.0
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c
index dac638be0d4..fa4b3fd4a00 100644
--- 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;