diff options
Diffstat (limited to 'src/live_effects/parameter')
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 11 | ||||
| -rw-r--r-- | src/live_effects/parameter/point.h | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 83e7e8f62..1fda97b0d 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -28,7 +28,10 @@ namespace LivePathEffect { PointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, const gchar *htip, Geom::Point default_value) - : Geom::Point(default_value), Parameter(label, tip, key, wr, effect), defvalue(default_value) + : Geom::Point(default_value), + Parameter(label, tip, key, wr, effect), + defvalue(default_value), + lpeitem( NULL) { knot_shape = SP_KNOT_SHAPE_DIAMOND; knot_mode = SP_KNOT_MODE_XOR; @@ -123,9 +126,8 @@ PointParam::param_set_and_write_new_value (Geom::Point newpoint) gchar * str = g_strdup(os.str().c_str()); param_write_to_repr(str); g_free(str); - SPLPEItem* item = reinterpret_cast<SPLPEItem*>(param_effect->getLPEObj()); - if(item){ - sp_lpe_item_update_patheffect(item, false, false); + if(lpeitem){ + sp_lpe_item_update_patheffect(lpeitem, false, false); } } @@ -196,6 +198,7 @@ PointParamKnotHolderEntity::knot_click(guint state) void PointParam::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { + lpeitem = dynamic_cast<SPLPEItem*>(item); 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); diff --git a/src/live_effects/parameter/point.h b/src/live_effects/parameter/point.h index 95854ea52..99eb86e96 100644 --- a/src/live_effects/parameter/point.h +++ b/src/live_effects/parameter/point.h @@ -59,7 +59,7 @@ private: PointParam& operator=(const PointParam&); Geom::Point defvalue; - + SPLPEItem * lpeitem; SPKnotShapeType knot_shape; SPKnotModeType knot_mode; guint32 knot_color; |
