summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/point.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-10 20:42:56 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-10 20:42:56 +0000
commit2c0bdb603b9213af98db374f1a31435ecc15cec9 (patch)
treeeef8ceea40b798116df1c0cf882ecd35e915310e /src/live_effects/parameter/point.cpp
parentThis commit remove all ocurrences of Active Desktop casts and all tool swith ... (diff)
downloadinkscape-2c0bdb603b9213af98db374f1a31435ecc15cec9.tar.gz
inkscape-2c0bdb603b9213af98db374f1a31435ecc15cec9.zip
Fix a bug whith previous commit
(bzr r13988)
Diffstat (limited to 'src/live_effects/parameter/point.cpp')
-rw-r--r--src/live_effects/parameter/point.cpp11
1 files changed, 7 insertions, 4 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);