[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14870] trunk/blender/source/blender/src: Fix for two UI glitches:
Brecht Van Lommel
brechtvanlommel at pandora.be
Fri May 16 19:36:09 CEST 2008
Revision: 14870
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14870
Author: blendix
Date: 2008-05-16 19:36:06 +0200 (Fri, 16 May 2008)
Log Message:
-----------
Fix for two UI glitches:
Bug #11711: particle start frame could get NaN value.
Bug #11714: x-axis mirror button didn't work.
Modified Paths:
--------------
trunk/blender/source/blender/src/buttons_editing.c
trunk/blender/source/blender/src/interface.c
Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c 2008-05-16 15:00:21 UTC (rev 14869)
+++ trunk/blender/source/blender/src/buttons_editing.c 2008-05-16 17:36:06 UTC (rev 14870)
@@ -5081,8 +5081,6 @@
uiBlockEndAlign(block);
- uiDefButBitS(block, TOG, B_MESH_X_MIRROR, B_DIFF, "X-axis mirror",1125,0,150,19, &G.scene->toolsettings->editbutflag, 0, 0, 0, 0, "While using transforms, mirrors the transformation");
-
uiDefButC(block, MENU, REDRAWBUTSEDIT, "Edge Alt-Select Mode%t|Loop Select%x0|Tag Edges (Seam)%x1|Tag Edges (Sharp)%x2|Tag Edges (Crease)%x3|Tag Edges (Bevel)%x4",1125,88,150,19, &G.scene->toolsettings->edge_mode, 0, 0, 0, 0, "Operation to use when Alt+RMB on edges, Use Alt+Shift+RMB to tag the shortest path from the active edge");
uiBlockBeginAlign(block);
Modified: trunk/blender/source/blender/src/interface.c
===================================================================
--- trunk/blender/source/blender/src/interface.c 2008-05-16 15:00:21 UTC (rev 14869)
+++ trunk/blender/source/blender/src/interface.c 2008-05-16 17:36:06 UTC (rev 14870)
@@ -2114,7 +2114,7 @@
static int ui_do_but_NUM(uiBut *but)
{
- double value;
+ double value, butrange;
float deler, fstart, f, tempf, pressure;
int lvalue, temp, orig_x; /* , firsttime=1; */
short retval=0, qual, sx, mval[2], pos=0;
@@ -2128,7 +2128,8 @@
sx= mval[0];
orig_x = sx; /* Store so we can scale the rate of change by the dist the mouse is from its original xlocation */
- fstart= (value - but->min)/(but->max-but->min);
+ butrange= (but->max - but->min);
+ fstart= (butrange == 0.0)? 0.0f: value/butrange;
f= fstart;
temp= (int)value;
More information about the Bf-blender-cvs
mailing list