summaryrefslogtreecommitdiffstats
path: root/src/vanishing-point.cpp
diff options
context:
space:
mode:
authorAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-03 18:53:39 +0000
committerAdrian Boguszewski <adrbogus1@student.pg.gda.pl>2016-07-03 18:53:39 +0000
commitb3e8b69d72b193cffe4b5e1be228f63769b5398d (patch)
tree96c38c7bf7df9a99e3fd3867378b41d4e89f4855 /src/vanishing-point.cpp
parentAdded xmlNodes as range function (diff)
parentavoid zero SBasis curve. (Bug 1593963) (diff)
downloadinkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.tar.gz
inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.zip
Added items as a range function
(bzr r14954.1.13)
Diffstat (limited to 'src/vanishing-point.cpp')
-rw-r--r--src/vanishing-point.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/vanishing-point.cpp b/src/vanishing-point.cpp
index a6be353f8..8158a76a9 100644
--- a/src/vanishing-point.cpp
+++ b/src/vanishing-point.cpp
@@ -258,8 +258,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->items();
- 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 +397,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->items();
- 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 +575,8 @@ VPDrag::updateDraggers ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist= this->selection->items();
- 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 +607,8 @@ VPDrag::updateLines ()
g_return_if_fail (this->selection != NULL);
- std::vector<SPItem*> itemlist= this->selection->items();
- 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 +625,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->items();
+ 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;
}