summaryrefslogtreecommitdiffstats
path: root/src/persp3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/persp3d.cpp')
-rw-r--r--src/persp3d.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/persp3d.cpp b/src/persp3d.cpp
index 809242ed8..ff00f9441 100644
--- a/src/persp3d.cpp
+++ b/src/persp3d.cpp
@@ -213,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;
@@ -491,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()) {
@@ -531,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();