From 5a8b00f027b9eb3d4abb290d2ddf26d36d71cf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20dos=20Santos=20Oliveira?= Date: Mon, 5 May 2014 04:13:35 -0300 Subject: Enabling path manipulator to comunicate if paths are bspline when accessing const objects. This change was required to correctly show on the GUI whether or not a node was a bspline. (bzr r11950.8.1) --- src/sp-lpe-item.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/sp-lpe-item.cpp') diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index f59bc33ee..33359727a 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -606,6 +606,22 @@ SPLPEItem::getPathEffectOfType(int type) return NULL; } +Inkscape::LivePathEffect::Effect const* +SPLPEItem::getPathEffectOfType(int type) const +{ + std::list::const_iterator i; + for (i = path_effect_list->begin(); i != path_effect_list->end(); ++i) { + LivePathEffectObject const *lpeobj = (*i)->lpeobject; + if (lpeobj) { + Inkscape::LivePathEffect::Effect const *lpe = lpeobj->get_lpe(); + if (lpe && (lpe->effectType() == type)) { + return lpe; + } + } + } + return NULL; +} + void SPLPEItem::editNextParamOncanvas(SPDesktop *dt) { Inkscape::LivePathEffect::LPEObjectReference *lperef = this->getCurrentLPEReference(); -- cgit v1.2.3