diff options
| author | Jabiertxof <jtx@jtx> | 2016-12-19 20:54:42 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2016-12-19 20:54:42 +0000 |
| commit | 952eb10b1e00f0e4abfbf8dd23fcb3935019f098 (patch) | |
| tree | cb123421faab0392a6c79a524208e987ba22ec4e /src | |
| parent | Remove unneeded static var from previous commit (diff) | |
| download | inkscape-952eb10b1e00f0e4abfbf8dd23fcb3935019f098.tar.gz inkscape-952eb10b1e00f0e4abfbf8dd23fcb3935019f098.zip | |
Remove some ocurrences of desktop in knot functions
(bzr r15337)
Diffstat (limited to 'src')
26 files changed, 47 insertions, 56 deletions
diff --git a/src/knot-holder-entity.cpp b/src/knot-holder-entity.cpp index 95b135be0..8add35d46 100644 --- a/src/knot-holder-entity.cpp +++ b/src/knot-holder-entity.cpp @@ -24,6 +24,7 @@ #include "sp-pattern.h" #include "snap.h" #include "desktop.h" +#include "inkscape.h" #include "sp-namedview.h" int KnotHolderEntity::counter = 0; @@ -32,6 +33,9 @@ void KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *pare const gchar *tip, SPKnotShapeType shape, SPKnotModeType mode, guint32 color) { + if (!desktop) { + desktop = SP_ACTIVE_DESKTOP; + } knot = new SPKnot(desktop, tip); this->parent_holder = parent; diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 4458c3a20..5cc0d6f20 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -612,15 +612,15 @@ Effect::registerParameter(Parameter * param) * Add all registered LPE knotholder handles to the knotholder */ void -Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +Effect::addHandles(KnotHolder *knotholder, SPItem *item) { using namespace Inkscape::LivePathEffect; // add handles provided by the effect itself - addKnotHolderEntities(knotholder, desktop, item); + addKnotHolderEntities(knotholder, item); // add handles provided by the effect's parameters (if any) for (std::vector<Parameter *>::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { - (*p)->addKnotHolderEntities(knotholder, desktop, item); + (*p)->addKnotHolderEntities(knotholder, item); } } diff --git a/src/live_effects/effect.h b/src/live_effects/effect.h index 06aa075eb..1997ff0ca 100644 --- a/src/live_effects/effect.h +++ b/src/live_effects/effect.h @@ -100,7 +100,7 @@ public: // /TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant // (but spiro lpe still needs it!) virtual LPEPathFlashType pathFlashType() const { return DEFAULT; } - void addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + void addHandles(KnotHolder *knotholder, SPItem *item); std::vector<Geom::PathVector> getCanvasIndicators(SPLPEItem const* lpeitem); void update_helperpath(); @@ -142,7 +142,7 @@ protected: void registerParameter(Parameter * param); Parameter * getNextOncanvasEditableParam(); - virtual void addKnotHolderEntities(KnotHolder * /*knotholder*/, SPDesktop * /*desktop*/, SPItem * /*item*/) {}; + virtual void addKnotHolderEntities(KnotHolder * /*knotholder*/, SPItem * /*item*/) {}; virtual void addCanvasIndicators(SPLPEItem const* lpeitem, std::vector<Geom::PathVector> &hp_vec); diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp index 7c6882f30..2defecb77 100644 --- a/src/live_effects/lpe-knot.cpp +++ b/src/live_effects/lpe-knot.cpp @@ -615,10 +615,10 @@ LPEKnot::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::Pat hp_vec.push_back(pathv); } -void LPEKnot::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +void LPEKnot::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new KnotHolderEntityCrossingSwitcher(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Drag to select a crossing, click to flip it") ); knotholder->add(e); }; diff --git a/src/live_effects/lpe-knot.h b/src/live_effects/lpe-knot.h index 95bfaf6e1..ac518b97c 100644 --- a/src/live_effects/lpe-knot.h +++ b/src/live_effects/lpe-knot.h @@ -61,7 +61,7 @@ public: /* the knotholder entity classes must be declared friends */ friend class KnotHolderEntityCrossingSwitcher; - void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); protected: virtual void addCanvasIndicators(SPLPEItem const *lpeitem, std::vector<Geom::PathVector> &hp_vec); diff --git a/src/live_effects/lpe-patternalongpath.cpp b/src/live_effects/lpe-patternalongpath.cpp index 9cfeffee7..e5c9f1be1 100644 --- a/src/live_effects/lpe-patternalongpath.cpp +++ b/src/live_effects/lpe-patternalongpath.cpp @@ -275,10 +275,10 @@ LPEPatternAlongPath::addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vect void -LPEPatternAlongPath::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +LPEPatternAlongPath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new WPAP::KnotHolderEntityWidthPatternAlongPath(this); - e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE); + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Change the width"), SP_KNOT_SHAPE_CIRCLE); knotholder->add(e); } diff --git a/src/live_effects/lpe-patternalongpath.h b/src/live_effects/lpe-patternalongpath.h index 3d7fc02bc..c34a9a15d 100644 --- a/src/live_effects/lpe-patternalongpath.h +++ b/src/live_effects/lpe-patternalongpath.h @@ -43,7 +43,7 @@ public: void addCanvasIndicators(SPLPEItem const */*lpeitem*/, std::vector<Geom::PathVector> &hp_vec); - virtual void addKnotHolderEntities(KnotHolder * knotholder, SPDesktop * desktop, SPItem * item); + virtual void addKnotHolderEntities(KnotHolder * knotholder, SPItem * item); PathParam pattern; diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 2c6d66cee..979b6dea5 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -18,7 +18,6 @@ #include "live_effects/lpeobject.h" #include "knot-holder-entity.h" #include "knotholder.h" -#include "desktop.h" #include <util/units.h> // TODO due to internal breakage in glibmm headers, this must be last: @@ -243,9 +242,9 @@ LPEPerspectivePath::newWidget() return dynamic_cast<Gtk::Widget *>(vbox); } -void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new PP::KnotHolderEntityOffset(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the origin") ); knotholder->add(e); }; diff --git a/src/live_effects/lpe-perspective_path.h b/src/live_effects/lpe-perspective_path.h index c4ddf1853..87ee453ff 100644 --- a/src/live_effects/lpe-perspective_path.h +++ b/src/live_effects/lpe-perspective_path.h @@ -41,7 +41,7 @@ public: virtual Gtk::Widget * newWidget(); /* the knotholder entity classes must be declared friends */ friend class PP::KnotHolderEntityOffset; - void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); private: // add the parameters for your effect here: diff --git a/src/live_effects/lpe-skeleton.cpp b/src/live_effects/lpe-skeleton.cpp index adc4a3493..4fc18cee2 100644 --- a/src/live_effects/lpe-skeleton.cpp +++ b/src/live_effects/lpe-skeleton.cpp @@ -97,10 +97,10 @@ public: } // namespace Skeleton void -LPESkeleton::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +LPESkeleton::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { { KnotHolderEntityMyHandle *e = new KnotHolderEntityMyHandle(this); - e->create( desktop, item, knotholder, + e->create( NULL, item, knotholder, _("Text describing what this handle does"), //optional: knot_shape, knot_mode, knot_color); knotholder->add(e); diff --git a/src/live_effects/lpe-skeleton.h b/src/live_effects/lpe-skeleton.h index 3b45b6978..e633ba5ab 100644 --- a/src/live_effects/lpe-skeleton.h +++ b/src/live_effects/lpe-skeleton.h @@ -41,7 +41,7 @@ public: /* the knotholder entity classes (if any) can be declared friends */ //friend class Skeleton::KnotHolderEntityMyHandle; - //virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + //virtual void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); private: // add the parameters for your effect here: diff --git a/src/live_effects/lpe-spiro.cpp b/src/live_effects/lpe-spiro.cpp index 4a41dc5a0..8ea57bee4 100644 --- a/src/live_effects/lpe-spiro.cpp +++ b/src/live_effects/lpe-spiro.cpp @@ -16,8 +16,6 @@ // For handling un-continuous paths: #include "message-stack.h" #include "inkscape.h" -#include "desktop.h" - namespace Inkscape { namespace LivePathEffect { diff --git a/src/live_effects/lpe-tangent_to_curve.cpp b/src/live_effects/lpe-tangent_to_curve.cpp index 76d4ea71b..5f63e1ee9 100644 --- a/src/live_effects/lpe-tangent_to_curve.cpp +++ b/src/live_effects/lpe-tangent_to_curve.cpp @@ -92,22 +92,22 @@ LPETangentToCurve::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const } void -LPETangentToCurve::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { +LPETangentToCurve::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { { KnotHolderEntity *e = new TtC::KnotHolderEntityAttachPt(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the point of attachment of the tangent") ); knotholder->add(e); } { KnotHolderEntity *e = new TtC::KnotHolderEntityLeftEnd(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the <b>left</b> end of the tangent") ); knotholder->add(e); } { KnotHolderEntity *e = new TtC::KnotHolderEntityRightEnd(this); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create( NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Adjust the <b>right</b> end of the tangent") ); knotholder->add(e); } diff --git a/src/live_effects/lpe-tangent_to_curve.h b/src/live_effects/lpe-tangent_to_curve.h index 8e44c01d1..a6a3c17ca 100644 --- a/src/live_effects/lpe-tangent_to_curve.h +++ b/src/live_effects/lpe-tangent_to_curve.h @@ -41,7 +41,7 @@ public: friend class TtC::KnotHolderEntityLeftEnd; friend class TtC::KnotHolderEntityRightEnd; friend class TtC::KnotHolderEntityAttachPt; - virtual void addKnotHolderEntities(KnotHolder * knotholder, SPDesktop * desktop, SPItem * item); + virtual void addKnotHolderEntities(KnotHolder * knotholder, SPItem * item); private: ScalarParam angle; diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index 4ffc41691..f4a81aa90 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -435,14 +435,14 @@ Piecewise<D2<SBasis> > stretch_along(Piecewise<D2<SBasis> > pwd2_in, Geom::Path } } -void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { KnotHolderEntity *e = new TpS::KnotHolderEntityAttachBegin(this); - e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE); + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE); knotholder->add(e); KnotHolderEntity *f = new TpS::KnotHolderEntityAttachEnd(this); - f->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE); + f->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE); knotholder->add(f); } diff --git a/src/live_effects/lpe-taperstroke.h b/src/live_effects/lpe-taperstroke.h index 88604486e..e3ecbb56c 100644 --- a/src/live_effects/lpe-taperstroke.h +++ b/src/live_effects/lpe-taperstroke.h @@ -36,7 +36,7 @@ public: virtual Geom::PathVector doEffect_path (Geom::PathVector const& path_in); Geom::PathVector doEffect_simplePath(Geom::PathVector const& path_in); - virtual void addKnotHolderEntities(KnotHolder * knotholder, SPDesktop * desktop, SPItem * item); + virtual void addKnotHolderEntities(KnotHolder * knotholder, SPItem * item); friend class TpS::KnotHolderEntityAttachBegin; friend class TpS::KnotHolderEntityAttachEnd; diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp index b321a5831..7696288b0 100644 --- a/src/live_effects/parameter/filletchamferpointarray.cpp +++ b/src/live_effects/parameter/filletchamferpointarray.cpp @@ -24,7 +24,6 @@ #include "selection.h" // needed for on-canvas editting: -#include "desktop.h" #include "live_effects/lpeobject.h" #include "helper/geom-nodetype.h" #include "helper/geom-curves.h" @@ -825,10 +824,7 @@ void FilletChamferPointArrayParamKnotHolderEntity::knot_set_offset( this->parent_holder->knot_ungrabbed_handler(this->knot, 0); } -void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, - SPDesktop *desktop, - SPItem *item) -{ +void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { recalculate_knots(get_pwd2()); for (unsigned int i = 0; i < _vector.size(); ++i) { if (_vector[i][Y] <= 0) { @@ -854,7 +850,7 @@ void FilletChamferPointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, } FilletChamferPointArrayParamKnotHolderEntity *e = new FilletChamferPointArrayParamKnotHolderEntity(this, i); - e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip), + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _(tip), knot_shape, knot_mode, knot_color); knotholder->add(e); } diff --git a/src/live_effects/parameter/filletchamferpointarray.h b/src/live_effects/parameter/filletchamferpointarray.h index 48cd26d2d..b81339a69 100644 --- a/src/live_effects/parameter/filletchamferpointarray.h +++ b/src/live_effects/parameter/filletchamferpointarray.h @@ -59,8 +59,7 @@ public: return true; } virtual void updateCanvasIndicators(); - virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, - SPItem *item); + virtual void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); void set_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const &pwd2_in, Geom::Piecewise<Geom::D2<Geom::SBasis> > const &pwd2_normal_in); diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index 5dbcb7868..6cf10710c 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -68,7 +68,7 @@ public: // overload these for your particular parameter to make it provide knotholder handles or canvas helperpaths virtual bool providesKnotHolderEntities() const { return false; } - virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPDesktop */*desktop*/, SPItem */*item*/) {}; + virtual void addKnotHolderEntities(KnotHolder */*knotholder*/, SPItem */*item*/) {}; virtual void addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector<Geom::PathVector> &/*hp_vec*/) {}; virtual void param_editOncanvas(SPItem * /*item*/, SPDesktop * /*dt*/) {}; diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 3442fd851..c87b1e299 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -15,9 +15,6 @@ #include "knotholder.h" #include <glibmm/i18n.h> -// needed for on-canvas editting: -#include "desktop.h" - namespace Inkscape { namespace LivePathEffect { @@ -126,9 +123,8 @@ PointParam::param_newWidget() *param_wr, param_effect->getRepr(), param_effect->getSPDoc() ) ); - // TODO: fix to get correct desktop (don't use SP_ACTIVE_DESKTOP) - SPDesktop *desktop = SP_ACTIVE_DESKTOP; - Geom::Affine transf = desktop->doc2dt(); + Geom::Affine transf = Geom::Scale(1, -1); + transf[5] = SP_ACTIVE_DOCUMENT->getHeight().value("px"); _pointwdg->setTransform(transf); _pointwdg->setValue( *this ); _pointwdg->clearProgrammatically(); @@ -205,12 +201,12 @@ PointParamKnotHolderEntity::knot_click(guint state) } void -PointParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +PointParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { knoth = knotholder; PointParamKnotHolderEntity *e = new PointParamKnotHolderEntity(this); // TODO: can we ditch handleTip() etc. because we have access to handle_tip etc. itself??? - e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color); + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color); knotholder->add(e); } diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index 62c6fb83d..e8cb66225 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -49,7 +49,7 @@ public: void set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color); virtual bool providesKnotHolderEntities() const { return true; } - virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + virtual void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); friend class PointParamKnotHolderEntity; private: diff --git a/src/live_effects/parameter/powerstrokepointarray.cpp b/src/live_effects/parameter/powerstrokepointarray.cpp index c61e8f9cb..7753d819d 100644 --- a/src/live_effects/parameter/powerstrokepointarray.cpp +++ b/src/live_effects/parameter/powerstrokepointarray.cpp @@ -248,11 +248,11 @@ PowerStrokePointArrayParamKnotHolderEntity::knot_click(guint state) } } -void PowerStrokePointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +void PowerStrokePointArrayParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { for (unsigned int i = 0; i < _vector.size(); ++i) { PowerStrokePointArrayParamKnotHolderEntity *e = new PowerStrokePointArrayParamKnotHolderEntity(this, i); - e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, + e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, _("<b>Stroke width control point</b>: drag to alter the stroke width. <b>Ctrl+click</b> adds a control point, <b>Ctrl+Alt+click</b> deletes it, <b>Shift+click</b> launches width dialog."), knot_shape, knot_mode, knot_color); knotholder->add(e); diff --git a/src/live_effects/parameter/powerstrokepointarray.h b/src/live_effects/parameter/powerstrokepointarray.h index 70b22e27e..56a609fa8 100644 --- a/src/live_effects/parameter/powerstrokepointarray.h +++ b/src/live_effects/parameter/powerstrokepointarray.h @@ -38,7 +38,7 @@ public: float median_width(); virtual bool providesKnotHolderEntities() const { return true; } - virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + virtual void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); void set_pwd2(Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_in, Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_normal_in); Geom::Piecewise<Geom::D2<Geom::SBasis> > const & get_pwd2() const { return last_pwd2; } diff --git a/src/live_effects/parameter/vector.cpp b/src/live_effects/parameter/vector.cpp index cfaa9e7e7..aa16a2b98 100644 --- a/src/live_effects/parameter/vector.cpp +++ b/src/live_effects/parameter/vector.cpp @@ -14,7 +14,6 @@ #include "svg/stringstream.h" #include "live_effects/effect.h" -#include "desktop.h" #include "verbs.h" namespace Inkscape { @@ -188,14 +187,14 @@ private: }; void -VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) +VectorParam::addKnotHolderEntities(KnotHolder *knotholder, SPItem *item) { VectorParamKnotHolderEntity_Origin *origin_e = new VectorParamKnotHolderEntity_Origin(this); - origin_e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); + origin_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), ori_knot_shape, ori_knot_mode, ori_knot_color); knotholder->add(origin_e); VectorParamKnotHolderEntity_Vector *vector_e = new VectorParamKnotHolderEntity_Vector(this); - vector_e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); + vector_e->create(NULL, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), vec_knot_shape, vec_knot_mode, vec_knot_color); knotholder->add(vector_e); } diff --git a/src/live_effects/parameter/vector.h b/src/live_effects/parameter/vector.h index 35ca04437..edee4ff4d 100644 --- a/src/live_effects/parameter/vector.h +++ b/src/live_effects/parameter/vector.h @@ -53,7 +53,7 @@ public: void set_oncanvas_color(guint32 color); virtual bool providesKnotHolderEntities() const { return true; } - virtual void addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item); + virtual void addKnotHolderEntities(KnotHolder *knotholder, SPItem *item); private: VectorParam(const VectorParam&); diff --git a/src/ui/object-edit.cpp b/src/ui/object-edit.cpp index 2763e6c4b..cf2c03396 100644 --- a/src/ui/object-edit.cpp +++ b/src/ui/object-edit.cpp @@ -43,7 +43,7 @@ static KnotHolder *sp_lpe_knot_holder(SPLPEItem *item, SPDesktop *desktop) KnotHolder *knot_holder = new KnotHolder(desktop, item, NULL); Inkscape::LivePathEffect::Effect *effect = item->getCurrentLPE(); - effect->addHandles(knot_holder, desktop, item); + effect->addHandles(knot_holder, item); return knot_holder; } |
