diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-04-26 23:12:03 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <mc@M0nst3r.bouyguesbox.fr> | 2015-04-26 23:12:03 +0000 |
| commit | 60bdd590969d1c32c392a8fed15f4ceac4a678d2 (patch) | |
| tree | 87b14c9b5238e99cb319ff9245caa37b8b1d3c6a /src/ui | |
| parent | fix (diff) | |
| download | inkscape-60bdd590969d1c32c392a8fed15f4ceac4a678d2.tar.gz inkscape-60bdd590969d1c32c392a8fed15f4ceac4a678d2.zip | |
Just reread the entire diff against trunk. Given the diff size, i must have forgotten things, but hopefully, there are only very few changes of semantics:
->childList is now in the intuitive order (childList()[0] is now firstChild)
-> sp_selection_paste_impl is now in the opposite order (change is local to selection-chemistry.cpp, and simplify a few things)
-> selection.setReprList now takes the list in the opposite order. It was always the case (the list was always reversed before handing to it)
-> a few comparison functions now work "the c++ way": the C way was to return -1 if a<b, 0 if a==b and 1 if a>b, now they return (bool)(a<b)
(bzr r13922.1.15)
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/dialog/clonetiler.cpp | 3 | ||||
| -rw-r--r-- | src/ui/dialog/find.cpp | 2 | ||||
| -rw-r--r-- | src/ui/tools/tweak-tool.cpp | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index b348bdcad..f84a2ffd6 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -2113,8 +2113,7 @@ void CloneTiler::clonetiler_unclump(GtkWidget */*widget*/, void *) } desktop->getDocument()->ensureUpToDate(); - std::vector<SPItem*> tu2(to_unclump); - for(int i=0;i<tu2.size();i++)to_unclump[i]=tu2[tu2.size()-i-1]; + reverse(to_unclump.begin(),to_unclump.end()); unclump (to_unclump); DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_CLONETILER, diff --git a/src/ui/dialog/find.cpp b/src/ui/dialog/find.cpp index 173acca93..a8ac42a1b 100644 --- a/src/ui/dialog/find.cpp +++ b/src/ui/dialog/find.cpp @@ -762,7 +762,7 @@ std::vector<SPItem*> &Find::all_items (SPObject *r, std::vector<SPItem*> &l, boo std::vector<SPItem*> &Find::all_selection_items (Inkscape::Selection *s, std::vector<SPItem*> &l, SPObject *ancestor, bool hidden, bool locked) { std::vector<SPItem*> itemlist=s->itemList(); - for(std::vector<SPItem*>::const_iterator i=itemlist.begin(); itemlist.end() != i; i++) { + for(std::vector<SPItem*>::const_reverse_iterator i=itemlist.rbegin(); itemlist.rend() != i; i++) { SPObject *obj = *i; SPItem *item = dynamic_cast<SPItem *>(obj); g_assert(item != NULL); diff --git a/src/ui/tools/tweak-tool.cpp b/src/ui/tools/tweak-tool.cpp index 76c748ae0..76b52f9be 100644 --- a/src/ui/tools/tweak-tool.cpp +++ b/src/ui/tools/tweak-tool.cpp @@ -378,7 +378,7 @@ sp_tweak_dilate_recursive (Inkscape::Selection *selection, SPItem *item, Geom::P std::vector<Inkscape::XML::Node*> to_select; SPDocument *doc = item->document; sp_item_list_to_curves (items, selected, to_select); - SPObject* newObj = doc->getObjectByRepr(to_select.back()); + SPObject* newObj = doc->getObjectByRepr(to_select[0]); item = dynamic_cast<SPItem *>(newObj); g_assert(item != NULL); selection->add(item); |
