Code

fix pasting of LPE's across multiple document; plus a number of small fixes.
authorjohanengelen <johanengelen@users.sourceforge.net>
Fri, 14 Sep 2007 21:41:07 +0000 (21:41 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Fri, 14 Sep 2007 21:41:07 +0000 (21:41 +0000)
po/POTFILES.in
src/live_effects/parameter/todo.txt
src/live_effects/todo.txt
src/selection-chemistry.cpp
src/sp-shape.cpp
src/sp-shape.h

index a196c3bce7d1c5a39356df93cd7b0784be9806bc..bfa44898b7c5f1dc098e51a25070938c38ad0ed4 100644 (file)
@@ -272,6 +272,7 @@ src/live_effects/parameter/parameter.cpp
 src/live_effects/parameter/path.cpp
 src/live_effects/parameter/point.cpp
 src/live_effects/parameter/bool.cpp
+src/live_effects/parameter/random.cpp
 src/main.cpp
 src/main-cmdlineact.cpp
 src/menus-skeleton.h
index d82411db070b1191a4d512c969db7cae055c51d9..dd66b86187b0da0faa6c8e9d9e412de5c0fa4fad 100644 (file)
@@ -1,8 +1,5 @@
 reminder list\r
 \r
-- make robust\r
-For example, the spinbuttons for scalarparam can "hang" which is very very very annoying.\r
-\r
 - add more types! \r
 straightlinepaths: for example for the gears effect. (curves are not important there)\r
 \r
index 51a7a3c21ee15926d2ff763486dc815847237fc6..52d7c45e9d2a8166c31ad9039c0cd72ab88f370a 100644 (file)
@@ -3,8 +3,6 @@ reminder list
 \r
 cleanup nodepath code that draws helper path\r
 \r
-implement effect application to shapes: sp_shape_apply_path_effect\r
-   (done: star, ellipse, spiral)\r
 ARCS !!!  see sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr)\r
 \r
 make sp_nodepath_is_over_stroke perhaps\r
index 251aa6dc04531643d7844a4e00f8c1ba631a6775..331e164e87af9d87262a9484f219d9e547f50b1d 100644 (file)
@@ -934,6 +934,12 @@ void sp_copy_stuff_used_by_item (GSList **defs_clip, SPItem *item, const GSList
                 sp_copy_single (defs_clip, SP_OBJECT (shape->marker[i]), xml_doc);
             }
         }
+
+        // For shapes, also copy liveeffect if applicable
+        if (sp_shape_has_path_effect(shape)) {
+            g_message("copy to clip");
+            sp_copy_single (defs_clip, SP_OBJECT(sp_shape_get_livepatheffectobject(shape)), xml_doc);
+        }
     }
 
     if (SP_IS_TEXT_TEXTPATH (item)) {
index ff0ebf887f289846283e991ddd77b1dc49abadef..511081b4c2062b4e85e80167debe3437f73972ab 100644 (file)
@@ -1130,7 +1130,11 @@ LivePathEffectObject *
 sp_shape_get_livepatheffectobject(SPShape *shape) {
     if (!shape) return NULL;
 
-    return shape->path_effect_ref->lpeobject;
+    if (sp_shape_has_path_effect(shape)) {
+        return shape->path_effect_ref->lpeobject;
+    } else {
+        return NULL;
+    }
 }
 
 /**
@@ -1205,6 +1209,10 @@ void sp_shape_remove_path_effect(SPShape *shape)
     }
 }
 
+bool sp_shape_has_path_effect(SPShape *shape)
+{
+    return (shape->path_effect_href != NULL);
+}
 
 /*
   Local Variables:
index 23dd8cd3892e7d7814235df51c03476282121739..7563e2c7d760e29cda4fe0bdf494fda5bb623935 100644 (file)
@@ -44,7 +44,7 @@ struct SPShape : public SPItem {
 
     gchar *path_effect_href;
     Inkscape::LivePathEffect::LPEObjectReference *path_effect_ref;
-       sigc::connection lpe_modified_connection;
+    sigc::connection lpe_modified_connection;
 };
 
 struct SPShapeClass {
@@ -82,5 +82,6 @@ void sp_shape_perform_path_effect(SPCurve *curve, SPShape *shape);
 
 void sp_shape_set_path_effect(SPShape *shape, gchar *value);
 void sp_shape_remove_path_effect(SPShape *shape);
+bool sp_shape_has_path_effect(SPShape *shape);
 
 #endif