From 8e8734dc15e614586f9b4963b69671ce16d5c137 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 30 May 2008 20:36:13 +0000 Subject: LPE STACKING! (many thanks to the french students who made this.) (bzr r5766) --- src/object-edit.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/object-edit.cpp') 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); -- cgit v1.2.3