[Bf-blender-cvs] [883b420] master: Fix T45739: Number slider precision handling inconsistent between unit systems.

Bastien Montagne noreply at git.blender.org
Wed Aug 12 16:44:29 CEST 2015


Commit: 883b420a5156fe616488f975a6817fde4cab0352
Author: Bastien Montagne
Date:   Wed Aug 12 16:41:52 2015 +0200
Branches: master
https://developer.blender.org/rB883b420a5156fe616488f975a6817fde4cab0352

Fix T45739: Number slider precision handling inconsistent between unit systems.

When using unit system, step was multiplied by 100, could really not find any good reason to that.
Easy to revert anyway if needed, but in this case please explain why in code. ;)

Investigated and patch by Thomas Radeke (ThomasR), thanks.

===================================================================

M	source/blender/editors/interface/interface.c

===================================================================

diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 19b7803..31976c7 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2075,7 +2075,7 @@ static float ui_get_but_step_unit(uiBut *but, float step_default)
 	/* -1 is an error value */
 	if (step != -1.0) {
 		BLI_assert(step > 0.0);
-		return (float)(step / ui_get_but_scale_unit(but, 1.0)) * 100.0f;
+		return (float)(step / ui_get_but_scale_unit(but, 1.0));
 	}
 	else {
 		return step_default;




More information about the Bf-blender-cvs mailing list