summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorBastien Bouclet <bastien.bouclet@gmail.com>2008-03-28 19:13:14 +0000
committerbgk <bgk@users.sourceforge.net>2008-03-28 19:13:14 +0000
commit6ba273d25f2e2e2697d502eb9b56c10da96d7c1e (patch)
tree33a74ec0fae6b19d0948ce84a49c350767c8be7d /src/selection-chemistry.cpp
parentnr_matrix_inverse is no more, removed test from nr-matrix-test (diff)
downloadinkscape-6ba273d25f2e2e2697d502eb9b56c10da96d7c1e.tar.gz
inkscape-6ba273d25f2e2e2697d502eb9b56c10da96d7c1e.zip
- Created a SPLPEItem class that handles applying a LPE to an Item
- LPEs can now be applied to groups - Updated the bend path to work properly with groups (bzr r5219)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 81c4bc490..0ae2c8dc5 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -891,14 +891,8 @@ void sp_selection_paste_livepatheffect()
void sp_selection_remove_livepatheffect_impl(SPItem *item)
{
- if ( item && SP_IS_SHAPE(item) ) {
- sp_shape_remove_path_effect(SP_SHAPE(item));
- } else if (item && SP_IS_GROUP (item)) {
- for (SPObject *child = sp_object_first_child(SP_OBJECT(item)) ; child != NULL; child = SP_OBJECT_NEXT(child) ) {
- if (!SP_IS_ITEM (child))
- continue;
- sp_selection_remove_livepatheffect_impl (SP_ITEM(child));
- }
+ if ( item && SP_IS_LPE_ITEM(item) ) {
+ sp_lpe_item_remove_path_effect(SP_LPE_ITEM(item), false);
}
}
@@ -1626,9 +1620,8 @@ void sp_selection_next_patheffect_param(SPDesktop * dt)
if ( selection && !selection->isEmpty() ) {
SPItem *item = selection->singleItem();
if ( item && SP_IS_SHAPE(item)) {
- SPShape *shape = SP_SHAPE(item);
- if (sp_shape_has_path_effect(shape)) {
- sp_shape_edit_next_param_oncanvas(shape, dt);
+ if (sp_lpe_item_has_path_effect(SP_LPE_ITEM(item))) {
+ sp_lpe_item_edit_next_param_oncanvas(SP_LPE_ITEM(item), dt);
} else {
dt->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("The selection has no applied path effect."));
}