summaryrefslogtreecommitdiffstats
path: root/src/persp3d.cpp
diff options
context:
space:
mode:
authorMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
committerMichael Soegtrop <MSoegtrop@yahoo.de>2017-06-05 13:01:17 +0000
commit509ca3687330fea576ea67ae6c7f31d16e66b800 (patch)
tree9097520c54e355ded9bd0b4d6618af4e8dacdd91 /src/persp3d.cpp
parentupdated to latest trunk (diff)
parent[Bug #1695016] Xaml export misses some radialGradients. (diff)
downloadinkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.tar.gz
inkscape-509ca3687330fea576ea67ae6c7f31d16e66b800.zip
updated to latest trunk
(bzr r14876.2.4)
Diffstat (limited to 'src/persp3d.cpp')
-rw-r--r--src/persp3d.cpp19
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();