diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-10-03 20:51:05 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-10-03 20:51:05 +0000 |
| commit | 4db35e8a6706ddece9e977e5f26d4a6867ff8cbe (patch) | |
| tree | f9711f260f694d96e26bf3216fb64f2b38611b2b /src/live_effects/lpe-perspective_path.cpp | |
| parent | update to trunk (diff) | |
| parent | Merge in jabiertxof's hover information for measure tool (diff) | |
| download | inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.tar.gz inkscape-4db35e8a6706ddece9e977e5f26d4a6867ff8cbe.zip | |
Update to trunk
(bzr r15017.1.35)
Diffstat (limited to 'src/live_effects/lpe-perspective_path.cpp')
| -rw-r--r-- | src/live_effects/lpe-perspective_path.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index c8cdd7912..cb4e43d87 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -15,18 +15,13 @@ #include "persp3d.h" //#include "transf_mat_3x4.h" -#include "document.h" #include "document-private.h" #include "live_effects/lpe-perspective_path.h" #include "live_effects/lpeobject.h" -#include "sp-item-group.h" #include "knot-holder-entity.h" #include "knotholder.h" #include "desktop.h" #include <util/units.h> -#include "inkscape.h" - -#include <2geom/path.h> namespace Inkscape { namespace LivePathEffect { @@ -107,12 +102,12 @@ void LPEPerspectivePath::refresh(Gtk::Entry* perspective) { perspectiveID = perspective->get_text(); Persp3D *first = 0; Persp3D *persp = 0; - for ( SPObject *child = this->lpeobj->document->getDefs()->firstChild(); child && !persp; child = child->getNext() ) { - if (SP_IS_PERSP3D(child) && first == 0) { - first = SP_PERSP3D(child); + for (auto& child: lpeobj->document->getDefs()->children) { + if (SP_IS_PERSP3D(&child) && first == 0) { + first = SP_PERSP3D(&child); } - if (SP_IS_PERSP3D(child) && strcmp(child->getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) { - persp = SP_PERSP3D(child); + if (SP_IS_PERSP3D(&child) && strcmp(child.getId(), const_cast<const gchar *>(perspectiveID.c_str())) == 0) { + persp = SP_PERSP3D(&child); break; } } |
