diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-05-30 20:36:13 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-05-30 20:36:13 +0000 |
| commit | 8e8734dc15e614586f9b4963b69671ce16d5c137 (patch) | |
| tree | 036c4af16f6f673757e6e2c580a8ec5c4f3518de /src/object-edit.cpp | |
| parent | remove warnings (diff) | |
| download | inkscape-8e8734dc15e614586f9b4963b69671ce16d5c137.tar.gz inkscape-8e8734dc15e614586f9b4963b69671ce16d5c137.zip | |
LPE STACKING!
(many thanks to the french students who made this.)
(bzr r5766)
Diffstat (limited to 'src/object-edit.cpp')
| -rw-r--r-- | src/object-edit.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/object-edit.cpp b/src/object-edit.cpp index 091c99734..ecd6227f4 100644 --- a/src/object-edit.cpp +++ b/src/object-edit.cpp @@ -63,8 +63,12 @@ static SPKnotHolder *sp_lpe_knot_holder(SPItem *item, SPDesktop *desktop) { SPKnotHolder *knot_holder = sp_knot_holder_new(desktop, item, NULL); - Inkscape::LivePathEffect::Effect *effect = sp_lpe_item_get_livepatheffect(SP_LPE_ITEM(item)); - effect->addHandles(knot_holder); + Inkscape::LivePathEffect::Effect *effect = sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)); + if (!effect) { + g_error("sp_lpe_knot_holder: logical error, this method cannot be called with item having an LPE"); + } else { + effect->addHandles(knot_holder); + } return knot_holder; } @@ -72,12 +76,11 @@ static SPKnotHolder *sp_lpe_knot_holder(SPItem *item, SPDesktop *desktop) SPKnotHolder * sp_item_knot_holder(SPItem *item, SPDesktop *desktop) { - if (sp_lpe_item_has_path_effect(SP_LPE_ITEM(item)) && - sp_lpe_item_get_livepatheffect(SP_LPE_ITEM(item))->isVisible() && - sp_lpe_item_get_livepatheffect(SP_LPE_ITEM(item))->providesKnotholder()) { + if (sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item)) && + sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->isVisible() && + sp_lpe_item_get_current_lpe(SP_LPE_ITEM(item))->providesKnotholder()) { return sp_lpe_knot_holder(item, desktop); - } else - if (SP_IS_RECT(item)) { + } else if (SP_IS_RECT(item)) { return sp_rect_knot_holder(item, desktop); } else if (SP_IS_BOX3D(item)) { return box3d_knot_holder(item, desktop); |
