Fix for two UI glitches:
Bug #11711: particle start frame could get NaN value. Bug #11714: x-axis mirror button didn't work.
This commit is contained in:
@@ -5081,8 +5081,6 @@ static void editing_panel_mesh_tools1(Object *ob, Mesh *me)
|
||||
|
||||
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);
|
||||
|
||||
@@ -2114,7 +2114,7 @@ static int ui_act_as_text_but(uiBut *but)
|
||||
|
||||
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 @@ static int ui_do_but_NUM(uiBut *but)
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user