diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2007-09-14 21:41:07 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2007-09-14 21:41:07 +0000 |
| commit | 93124d10d65528cd8db7c81b1609c6533d4912cd (patch) | |
| tree | cbe14fabe62f4d678054e7a6d55267186e5566a0 /src | |
| parent | Fixed min/max confusion bug (diff) | |
| download | inkscape-93124d10d65528cd8db7c81b1609c6533d4912cd.tar.gz inkscape-93124d10d65528cd8db7c81b1609c6533d4912cd.zip | |
fix pasting of LPE's across multiple document; plus a number of small fixes.
(bzr r3745)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/parameter/todo.txt | 3 | ||||
| -rw-r--r-- | src/live_effects/todo.txt | 2 | ||||
| -rw-r--r-- | src/selection-chemistry.cpp | 6 | ||||
| -rw-r--r-- | src/sp-shape.cpp | 10 | ||||
| -rw-r--r-- | src/sp-shape.h | 3 |
5 files changed, 17 insertions, 7 deletions
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 |
