Commit 8938cca4 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

no need to memcpy() the arrays, they are properly copied by

2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpcurve.c (gimp_curve_copy): no need to memcpy() the
	arrays, they are properly copied by gimp_config_sync() now. Add
	call to gimp_data_dirty() so GimpCurvesConfig gets notified.

	* app/gegl/gimpcurvesconfig.c (gimp_curves_config_set_property):
	use gimp_config_copy() instead of copying the curve menually.


svn path=/trunk/; revision=27076
parent a4ff76a5
2008-09-29 Michael Natterer <mitch@gimp.org>
* app/core/gimpcurve.c (gimp_curve_copy): no need to memcpy() the
arrays, they are properly copied by gimp_config_sync() now. Add
call to gimp_data_dirty() so GimpCurvesConfig gets notified.
* app/gegl/gimpcurvesconfig.c (gimp_curves_config_set_property):
use gimp_config_copy() instead of copying the curve menually.
2008-09-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.c
......
......@@ -19,7 +19,6 @@
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <glib-object.h>
......@@ -503,14 +502,11 @@ gimp_curve_copy (GimpConfig *src,
gimp_config_sync (G_OBJECT (src), G_OBJECT (dest), flags);
memcpy (dest_curve->points, src_curve->points,
sizeof (GimpVector2) * src_curve->n_points);
memcpy (dest_curve->samples, src_curve->samples,
sizeof (gdouble) * src_curve->n_samples);
dest_curve->identity = src_curve->identity;
return FALSE;
gimp_data_dirty (GIMP_DATA (dest));
return TRUE;
}
......
......@@ -21,8 +21,6 @@
#include "config.h"
#include <string.h>
#include <gegl.h>
#include <glib/gstdio.h>
......@@ -207,14 +205,8 @@ gimp_curves_config_set_property (GObject *object,
if (src_curve && dest_curve)
{
gimp_config_sync (G_OBJECT (src_curve), G_OBJECT (dest_curve), 0);
memcpy (dest_curve->points, src_curve->points,
sizeof (GimpVector2) * src_curve->n_points);
memcpy (dest_curve->samples, src_curve->samples,
sizeof (gdouble) * src_curve->n_samples);
dest_curve->identity = src_curve->identity;
gimp_config_copy (GIMP_CONFIG (src_curve),
GIMP_CONFIG (dest_curve), 0);
}
}
break;
......@@ -340,8 +332,6 @@ gimp_curves_config_copy (GimpConfig *src,
flags);
}
g_object_notify (G_OBJECT (dest), "curve");
dest_config->channel = src_config->channel;
g_object_notify (G_OBJECT (dest), "channel");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment