diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-03 18:53:39 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-07-03 18:53:39 +0000 |
| commit | b3e8b69d72b193cffe4b5e1be228f63769b5398d (patch) | |
| tree | 96c38c7bf7df9a99e3fd3867378b41d4e89f4855 /src/ui/dialog/transformation.cpp | |
| parent | Added xmlNodes as range function (diff) | |
| parent | avoid zero SBasis curve. (Bug 1593963) (diff) | |
| download | inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.tar.gz inkscape-b3e8b69d72b193cffe4b5e1be228f63769b5398d.zip | |
Added items as a range function
(bzr r14954.1.13)
Diffstat (limited to 'src/ui/dialog/transformation.cpp')
| -rw-r--r-- | src/ui/dialog/transformation.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ui/dialog/transformation.cpp b/src/ui/dialog/transformation.cpp index f11ac1ebe..d4a0ffd68 100644 --- a/src/ui/dialog/transformation.cpp +++ b/src/ui/dialog/transformation.cpp @@ -650,7 +650,7 @@ void Transformation::updatePageTransform(Inkscape::Selection *selection) { if (selection && !selection->isEmpty()) { if (_check_replace_matrix.get_active()) { - Geom::Affine current (selection->items()[0]->transform); // take from the first item in selection + Geom::Affine current (selection->items().front()->transform); // take from the first item in selection Geom::Affine new_displayed = current; @@ -735,7 +735,7 @@ void Transformation::applyPageMove(Inkscape::Selection *selection) if (_check_move_relative.get_active()) { // shift each object relatively to the previous one - std::vector<SPItem*> selected(selection->items()); + std::vector<SPItem*> selected(selection->items().begin(), selection->items().end()); if (selected.empty()) return; if (fabs(x) > 1e-6) { @@ -810,8 +810,8 @@ void Transformation::applyPageScale(Inkscape::Selection *selection) bool transform_stroke = prefs->getBool("/options/transform/stroke", true); bool preserve = prefs->getBool("/options/preservetransform/value", false); if (prefs->getBool("/dialogs/transformation/applyseparately")) { - std::vector<SPItem*> tmp= selection->items(); - for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){ + auto tmp= selection->items(); + for(auto i=tmp.begin();i!=tmp.end();++i){ SPItem *item = *i; Geom::OptRect bbox_pref = item->desktopPreferredBounds(); Geom::OptRect bbox_geom = item->desktopGeometricBounds(); @@ -874,8 +874,8 @@ void Transformation::applyPageRotate(Inkscape::Selection *selection) } if (prefs->getBool("/dialogs/transformation/applyseparately")) { - std::vector<SPItem*> tmp= selection->items(); - for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){ + auto tmp= selection->items(); + for(auto i=tmp.begin();i!=tmp.end();++i){ SPItem *item = *i; sp_item_rotate_rel(item, Geom::Rotate (angle*M_PI/180.0)); } @@ -894,8 +894,8 @@ void Transformation::applyPageSkew(Inkscape::Selection *selection) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); if (prefs->getBool("/dialogs/transformation/applyseparately")) { - std::vector<SPItem*> items= selection->items(); - for(std::vector<SPItem*>::const_iterator i = items.begin();i!=items.end();++i){ + auto items = selection->items(); + for(auto i = items.begin();i!=items.end();++i){ SPItem *item = *i; if (!_units_skew.isAbsolute()) { // percentage @@ -996,8 +996,8 @@ void Transformation::applyPageTransform(Inkscape::Selection *selection) } if (_check_replace_matrix.get_active()) { - std::vector<SPItem*> tmp= selection->items(); - for(std::vector<SPItem*>::const_iterator i=tmp.begin();i!=tmp.end();++i){ + auto tmp = selection->items(); + for(auto i=tmp.begin();i!=tmp.end();++i){ SPItem *item = *i; item->set_item_transform(displayed); item->updateRepr(); @@ -1149,7 +1149,7 @@ void Transformation::onReplaceMatrixToggled() double f = _scalar_transform_f.getValue(); Geom::Affine displayed (a, b, c, d, e, f); - Geom::Affine current = selection->items()[0]->transform; // take from the first item in selection + Geom::Affine current = selection->items().front()->transform; // take from the first item in selection Geom::Affine new_displayed; if (_check_replace_matrix.get_active()) { |
