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/persp3d.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/persp3d.cpp')
| -rw-r--r-- | src/persp3d.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/persp3d.cpp b/src/persp3d.cpp index a48481145..ff00f9441 100644 --- a/src/persp3d.cpp +++ b/src/persp3d.cpp @@ -18,9 +18,7 @@ #include "document-undo.h" #include "vanishing-point.h" #include "ui/tools/box3d-tool.h" -#include "box3d.h" #include "svg/stringstream.h" -#include "xml/document.h" #include "xml/node-event-vector.h" #include "desktop.h" @@ -215,9 +213,10 @@ Persp3D *persp3d_create_xml_element(SPDocument *document, Persp3DImpl *dup) {// Persp3D *persp3d_document_first_persp(SPDocument *document) { Persp3D *first = 0; - for ( SPObject *child = document->getDefs()->firstChild(); child && !first; child = child->getNext() ) { - if (SP_IS_PERSP3D(child)) { - first = SP_PERSP3D(child); + for (auto& child: document->getDefs()->children) { + if (SP_IS_PERSP3D(&child)) { + first = SP_PERSP3D(&child); + break; } } return first; @@ -493,10 +492,10 @@ persp3d_on_repr_attr_changed ( Inkscape::XML::Node * /*repr*/, /* checks whether all boxes linked to this perspective are currently selected */ bool -persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::Selection *selection) { +persp3d_has_all_boxes_in_selection (Persp3D *persp, Inkscape::ObjectSet *set) { Persp3DImpl *persp_impl = persp->perspective_impl; - std::list<SPBox3D *> selboxes = selection->box3DList(); + std::list<SPBox3D *> selboxes = set->box3DList(); for (std::vector<SPBox3D *>::iterator i = persp_impl->boxes.begin(); i != persp_impl->boxes.end(); ++i) { if (std::find(selboxes.begin(), selboxes.end(), *i) == selboxes.end()) { @@ -533,9 +532,9 @@ persp3d_print_debugging_info (Persp3D *persp) { void persp3d_print_debugging_info_all(SPDocument *document) { - for ( SPObject *child = document->getDefs()->firstChild(); child; child = child->getNext() ) { - if (SP_IS_PERSP3D(child)) { - persp3d_print_debugging_info(SP_PERSP3D(child)); + for (auto& child: document->getDefs()->children) { + if (SP_IS_PERSP3D(&child)) { + persp3d_print_debugging_info(SP_PERSP3D(&child)); } } persp3d_print_all_selected(); |
