summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2016-08-12 04:11:03 +0000
committerTed Gould <ted@gould.cx>2016-08-12 04:11:03 +0000
commitff848ebc9919d158c3ec3d7420e72b6aca99a3ea (patch)
tree030ab171865d0ed7f6bae3ef68315639cdb2622b /src/vanishing-point.cpp
parentMerging 0.92.x branch (diff)
parentCloneTiler: Further C++ification (diff)
downloadinkscape-ff848ebc9919d158c3ec3d7420e72b6aca99a3ea.tar.gz
inkscape-ff848ebc9919d158c3ec3d7420e72b6aca99a3ea.zip
Merge trunk
(bzr r14950.1.20)
Diffstat (limited to 'src/vanishing-point.cpp')
-rw-r--r--src/vanishing-point.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index 32ccbad93..d849b35d9 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -21,12 +21,10 @@
#include "display/sp-canvas-item.h"
#include "display/sp-ctrlline.h"
#include "ui/tools/tool-base.h"
-#include "xml/repr.h"
#include "perspective-line.h"
#include "ui/shape-editor.h"
#include "snap.h"
#include "sp-namedview.h"
-#include "ui/control-manager.h"
#include "document-undo.h"
#include "verbs.h"
@@ -258,8 +256,8 @@ VanishingPoint::set_pos(Proj::Pt2 const &pt) {
std::list<SPBox3D *>
VanishingPoint::selectedBoxes(Inkscape::Selection *sel) {
std::list<SPBox3D *> sel_boxes;
- std::vector<SPItem*> itemlist=sel->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= sel->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box && this->hasBox(box)) {
@@ -397,8 +395,8 @@ VPDragger::VPsOfSelectedBoxes() {
VanishingPoint *vp;
// FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference.
Inkscape::Selection *sel = SP_ACTIVE_DESKTOP->getSelection();
- std::vector<SPItem*> itemlist=sel->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= sel->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -575,8 +573,8 @@ VPDrag::updateDraggers ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist=this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= this->selection->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -607,8 +605,8 @@ VPDrag::updateLines ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist=this->selection->itemList();
- for (std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i) {
+ auto itemlist= this->selection->items();
+ for (auto i=itemlist.begin();i!=itemlist.end();++i) {
SPItem *item = *i;
SPBox3D *box = dynamic_cast<SPBox3D *>(item);
if (box) {
@@ -625,11 +623,11 @@ VPDrag::updateBoxHandles ()
// FIXME: Is there a way to update the knots without accessing the
// (previously) statically linked function KnotHolder::update_knots?
- std::vector<SPItem*> sel = selection->itemList();
+ auto sel = selection->items();
if (sel.empty())
return; // no selection
- if (sel.size() > 1) {
+ if (boost::distance(sel) > 1) {
// Currently we only show handles if a single box is selected
return;
}