[gimp] app: properly implement GimpData::duplicate()



commit 592fce0f7bb27828157dd4887e221e6600d440f9
Author: Michael Natterer <mitch gimp org>
Date:   Tue Feb 16 19:58:06 2010 +0100

    app: properly implement GimpData::duplicate()

 app/core/gimpcurve.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/app/core/gimpcurve.c b/app/core/gimpcurve.c
index b19513a..0f3410c 100644
--- a/app/core/gimpcurve.c
+++ b/app/core/gimpcurve.c
@@ -434,12 +434,10 @@ gimp_curve_get_extension (GimpData *data)
 static GimpData *
 gimp_curve_duplicate (GimpData *data)
 {
-  GimpCurve *curve = GIMP_CURVE (data);
-  GimpCurve *new;
+  GimpCurve *new = g_object_new (GIMP_TYPE_CURVE, NULL);
 
-  new = g_object_new (GIMP_TYPE_CURVE,
-                      "curve-type", curve->curve_type,
-                      NULL);
+  gimp_config_copy (GIMP_CONFIG (data),
+                    GIMP_CONFIG (new), 0);
 
   return GIMP_DATA (new);
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]