diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-03 00:12:41 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2018-03-26 17:48:34 +0000 |
| commit | 95b1c7b549605d7c6ce6623cc4cd121ed7c51a64 (patch) | |
| tree | 1c38b4fe6baabbf45c55e0929516dd825f7d6847 /src/live_effects/parameter/point.cpp | |
| parent | Allow building with USE_PANGO_WIN32. (diff) | |
| download | inkscape-95b1c7b549605d7c6ce6623cc4cd121ed7c51a64.tar.gz inkscape-95b1c7b549605d7c6ce6623cc4cd121ed7c51a64.zip | |
Base LPE refactor
Diffstat (limited to 'src/live_effects/parameter/point.cpp')
| -rw-r--r-- | src/live_effects/parameter/point.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/live_effects/parameter/point.cpp b/src/live_effects/parameter/point.cpp index 9b4723da3..b811b7f2b 100644 --- a/src/live_effects/parameter/point.cpp +++ b/src/live_effects/parameter/point.cpp @@ -128,8 +128,7 @@ PointParam::param_getSVGValue() const { Inkscape::SVGOStringStream os; os << *dynamic_cast<Geom::Point const *>( this ); - gchar * str = g_strdup(os.str().c_str()); - return str; + return g_strdup(os.str().c_str()); } gchar * @@ -137,8 +136,7 @@ PointParam::param_getDefaultSVGValue() const { Inkscape::SVGOStringStream os; os << defvalue; - gchar * str = g_strdup(os.str().c_str()); - return str; + return g_strdup(os.str().c_str()); } void @@ -212,10 +210,10 @@ PointParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &or s = A; } } - pparam->param_setValue(s); - SPLPEItem * splpeitem = dynamic_cast<SPLPEItem *>(item); - if(splpeitem && this->pparam->liveupdate){ - sp_lpe_item_update_patheffect(splpeitem, true, true); + if(this->pparam->liveupdate){ + pparam->param_setValue(s, true); + } else { + pparam->param_setValue(s); } } @@ -231,10 +229,7 @@ PointParamKnotHolderEntity::knot_click(guint state) if (state & GDK_CONTROL_MASK) { if (state & GDK_MOD1_MASK) { this->pparam->param_set_default(); - SPLPEItem * splpeitem = dynamic_cast<SPLPEItem *>(item); - if(splpeitem){ - sp_lpe_item_update_patheffect(splpeitem, true, true); - } + pparam->param_setValue(*pparam,true); } } } |
