summaryrefslogtreecommitdiffstats
path: root/src/gradient-chemistry.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-05-23 14:47:28 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-05-26 07:45:16 +0000
commita4f0db6313fe187d96f9c25011de28903d8337d5 (patch)
treed39a7c46dd495b6699b8404d83a6799fed08d5e3 /src/gradient-chemistry.cpp
parentRename wrong named function (diff)
downloadinkscape-a4f0db6313fe187d96f9c25011de28903d8337d5.tar.gz
inkscape-a4f0db6313fe187d96f9c25011de28903d8337d5.zip
Fix gradient toolbar comboboxes and reverse
https://gitlab.com/inkscape/inkscape/issues/224
Diffstat (limited to '')
-rw-r--r--src/gradient-chemistry.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gradient-chemistry.cpp b/src/gradient-chemistry.cpp
index 63bdb397d..cde2d45e7 100644
--- a/src/gradient-chemistry.cpp
+++ b/src/gradient-chemistry.cpp
@@ -980,12 +980,11 @@ void sp_item_gradient_reverse_vector(SPItem *item, Inkscape::PaintTarget fill_or
i->deleteObject();
}
- std::vector<double>::iterator iter = offsets.end() - 1;
- for (auto copy:child_copies) {
- vector->appendChildRepr(copy);
- sp_repr_set_svg_double (copy, "offset", 1 - *iter);
- --iter;
- Inkscape::GC::release(copy);
+ std::vector<double>::reverse_iterator o_it = offsets.rbegin();
+ for (auto c_it = child_copies.rbegin(); c_it != child_copies.rend(); ++c_it, ++o_it) {
+ vector->appendChildRepr(*c_it);
+ sp_repr_set_svg_double (*c_it, "offset", 1 - *o_it);
+ Inkscape::GC::release(*c_it);
}
}