app: Fix stroking brush size to brush default

This commit is contained in:
Alexia Death 2011-03-19 23:26:34 +02:00
parent ce606d9561
commit 6d6ab78d2a
1 changed files with 18 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include "config/gimpcoreconfig.h"
#include "gimp.h"
#include "gimpbrush.h"
#include "gimpcontext.h"
#include "gimpdashpattern.h"
#include "gimpmarshal.h"
@ -559,8 +560,25 @@ gimp_stroke_options_prepare (GimpStrokeOptions *options,
if (use_default_values)
{
GimpBrush *brush;
gdouble brush_size;
gint height;
gint width;
paint_options = gimp_paint_options_new (paint_info);
brush = gimp_context_get_brush (context);
if (GIMP_IS_BRUSH(brush))
{
gimp_brush_transform_size (brush, 1.0, 1.0, 0.0, &height, &width);
brush_size = MAX (height, width);
g_object_set (paint_options,
"brush-size", brush_size,
NULL);
}
/* undefine the paint-relevant context properties and get them
* from the passed context
*/