mirror of https://github.com/GNOME/gimp.git
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* app/core/gimpbrushpipe.c (gimp_brush_pipe_select_brush): Don't initialize a new random number generator every time a brush is selected from a pipe. Fixes bug #148205).
This commit is contained in:
parent
1e77f9d4a7
commit
60655d8e7a
|
@ -1,3 +1,9 @@
|
|||
2004-12-09 Bill Skaggs <weskaggs@primate.ucdavis.edu>
|
||||
|
||||
* app/core/gimpbrushpipe.c (gimp_brush_pipe_select_brush):
|
||||
Don't initialize a new random number generator every time a brush
|
||||
is selected from a pipe. Fixes bug #148205).
|
||||
|
||||
2004-12-09 DindinX <dindinx@gimp.org>
|
||||
|
||||
* plug-ins/common/cartoon.c: marked the menu entry for translation
|
||||
|
|
|
@ -232,14 +232,10 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
GimpBrushPipe *pipe = GIMP_BRUSH_PIPE (brush);
|
||||
gint i, brushix, ix;
|
||||
gdouble angle;
|
||||
GRand *gr;
|
||||
|
||||
if (pipe->nbrushes == 1)
|
||||
return GIMP_BRUSH (pipe->current);
|
||||
|
||||
/* Initialise random number generator */
|
||||
gr = g_rand_new ();
|
||||
|
||||
brushix = 0;
|
||||
for (i = 0; i < pipe->dimension; i++)
|
||||
{
|
||||
|
@ -264,7 +260,7 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
|
||||
case PIPE_SELECT_RANDOM:
|
||||
/* This probably isn't the right way */
|
||||
ix = g_rand_int_range (gr, 0, pipe->rank[i]);
|
||||
ix = g_random_int_range (0, pipe->rank[i]);
|
||||
break;
|
||||
|
||||
case PIPE_SELECT_PRESSURE:
|
||||
|
@ -294,8 +290,6 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
|
||||
pipe->current = pipe->brushes[brushix];
|
||||
|
||||
g_rand_free (gr);
|
||||
|
||||
return GIMP_BRUSH (pipe->current);
|
||||
}
|
||||
|
||||
|
|
|
@ -232,14 +232,10 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
GimpBrushPipe *pipe = GIMP_BRUSH_PIPE (brush);
|
||||
gint i, brushix, ix;
|
||||
gdouble angle;
|
||||
GRand *gr;
|
||||
|
||||
if (pipe->nbrushes == 1)
|
||||
return GIMP_BRUSH (pipe->current);
|
||||
|
||||
/* Initialise random number generator */
|
||||
gr = g_rand_new ();
|
||||
|
||||
brushix = 0;
|
||||
for (i = 0; i < pipe->dimension; i++)
|
||||
{
|
||||
|
@ -264,7 +260,7 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
|
||||
case PIPE_SELECT_RANDOM:
|
||||
/* This probably isn't the right way */
|
||||
ix = g_rand_int_range (gr, 0, pipe->rank[i]);
|
||||
ix = g_random_int_range (0, pipe->rank[i]);
|
||||
break;
|
||||
|
||||
case PIPE_SELECT_PRESSURE:
|
||||
|
@ -294,8 +290,6 @@ gimp_brush_pipe_select_brush (GimpBrush *brush,
|
|||
|
||||
pipe->current = pipe->brushes[brushix];
|
||||
|
||||
g_rand_free (gr);
|
||||
|
||||
return GIMP_BRUSH (pipe->current);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue