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/widgets/stroke-style.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/widgets/stroke-style.cpp')
| -rw-r--r-- | src/widgets/stroke-style.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 7ed2c3180..9597d036a 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -515,8 +515,8 @@ void StrokeStyle::markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, //spw->updateMarkerHist(which); Inkscape::Selection *selection = spw->desktop->getSelection(); - std::vector<SPItem*> itemlist= selection->items(); - for(std::vector<SPItem*>::const_iterator i=itemlist.begin();i!=itemlist.end();++i){ + auto itemlist= selection->items(); + for(auto i=itemlist.begin();i!=itemlist.end();++i){ SPItem *item = *i; if (!SP_IS_SHAPE(item) || SP_IS_RECT(item)) { // can't set marker to rect, until it's converted to using <path> continue; @@ -988,7 +988,7 @@ StrokeStyle::updateLine() if (!sel || sel->isEmpty()) return; - std::vector<SPItem*> const objects = sel->items(); + std::vector<SPItem*> const objects(sel->items().begin(), sel->items().end()); SPObject * const object = objects[0]; SPStyle * const style = object->style; @@ -1044,7 +1044,7 @@ StrokeStyle::scaleLine() SPDocument *document = desktop->getDocument(); Inkscape::Selection *selection = desktop->getSelection(); - std::vector<SPItem*> items= selection->items(); + auto items= selection->items(); /* TODO: Create some standardized method */ SPCSSAttr *css = sp_repr_css_attr_new(); @@ -1064,7 +1064,7 @@ StrokeStyle::scaleLine() int ndash; dashSelector->get_dash(&ndash, &dash, &offset); - for(std::vector<SPItem*>::const_iterator i=items.begin();i!=items.end();++i){ + for(auto i=items.begin();i!=items.end();++i){ /* Set stroke width */ double width; if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) { |
