From: johanengelen Date: Fri, 14 Sep 2007 21:41:07 +0000 (+0000) Subject: fix pasting of LPE's across multiple document; plus a number of small fixes. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c218d43b0f2680ff2702939264e7a9e09f5707d0;p=inkscape.git fix pasting of LPE's across multiple document; plus a number of small fixes. --- diff --git a/po/POTFILES.in b/po/POTFILES.in index a196c3bce..bfa44898b 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/src/live_effects/parameter/todo.txt b/src/live_effects/parameter/todo.txt index d82411db0..dd66b8618 100644 --- a/src/live_effects/parameter/todo.txt +++ b/src/live_effects/parameter/todo.txt @@ -1,8 +1,5 @@ reminder list -- make robust -For example, the spinbuttons for scalarparam can "hang" which is very very very annoying. - - add more types! straightlinepaths: for example for the gears effect. (curves are not important there) diff --git a/src/live_effects/todo.txt b/src/live_effects/todo.txt index 51a7a3c21..52d7c45e9 100644 --- a/src/live_effects/todo.txt +++ b/src/live_effects/todo.txt @@ -3,8 +3,6 @@ reminder list cleanup nodepath code that draws helper path -implement effect application to shapes: sp_shape_apply_path_effect - (done: star, ellipse, spiral) ARCS !!! see sp_arc_set_elliptical_path_attribute(SPArc *arc, Inkscape::XML::Node *repr) make sp_nodepath_is_over_stroke perhaps diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 251aa6dc0..331e164e8 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -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)) { diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp index ff0ebf887..511081b4c 100644 --- a/src/sp-shape.cpp +++ b/src/sp-shape.cpp @@ -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: diff --git a/src/sp-shape.h b/src/sp-shape.h index 23dd8cd38..7563e2c7d 100644 --- a/src/sp-shape.h +++ b/src/sp-shape.h @@ -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