app: clean up paint core cleanup
This commit is contained in:
@ -1263,14 +1263,11 @@ gimp_paint_core_smooth_coords (GimpPaintCore *core,
|
|||||||
GimpPaintOptions *paint_options,
|
GimpPaintOptions *paint_options,
|
||||||
GimpCoords *coords)
|
GimpCoords *coords)
|
||||||
{
|
{
|
||||||
|
|
||||||
GimpSmoothingOptions *smoothing_options = paint_options->smoothing_options;
|
GimpSmoothingOptions *smoothing_options = paint_options->smoothing_options;
|
||||||
GArray *history = core->stroke_buffer;
|
GArray *history = core->stroke_buffer;
|
||||||
|
|
||||||
g_return_if_fail(GIMP_IS_PAINT_CORE(core));
|
|
||||||
|
|
||||||
if (core->stroke_buffer == NULL)
|
if (core->stroke_buffer == NULL)
|
||||||
return; /*Paint core has not initalized yet*/
|
return; /* Paint core has not initalized yet */
|
||||||
|
|
||||||
if (smoothing_options->use_smoothing &&
|
if (smoothing_options->use_smoothing &&
|
||||||
smoothing_options->smoothing_quality > 0)
|
smoothing_options->smoothing_quality > 0)
|
||||||
@ -1286,7 +1283,7 @@ gimp_paint_core_smooth_coords (GimpPaintCore *core,
|
|||||||
g_array_append_val (history, *coords);
|
g_array_append_val (history, *coords);
|
||||||
|
|
||||||
if (history->len < 2)
|
if (history->len < 2)
|
||||||
return; /*Just dont bother, nothing to do*/
|
return; /* Just dont bother, nothing to do */
|
||||||
|
|
||||||
coords->x = coords->y = 0.0;
|
coords->x = coords->y = 0.0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user