summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-05-07 22:25:20 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-05-07 22:25:20 +0000
commitfbe59eb1913a779115d9c4769a4066d08e30ff44 (patch)
tree08bd538216290a15751da775b76500bc4e9eb29a /src/path-chemistry.cpp
parentfix crash when converting a group of objects to path (diff)
downloadinkscape-fbe59eb1913a779115d9c4769a4066d08e30ff44.tar.gz
inkscape-fbe59eb1913a779115d9c4769a4066d08e30ff44.zip
better fix, using std::remove instead of std::erase
(bzr r14122)
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 98148b916..ff307cd66 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -388,9 +388,7 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
if (repr) {
to_select.insert(to_select.begin(),repr);
did = true;
- std::vector<SPItem*>::iterator element=find(selected.begin(),selected.end(),item);
- if(element != selected.end())
- selected.erase(find(selected.begin(),selected.end(),item));
+ remove(selected.begin(),selected.end(),item);
}
continue;
@@ -415,9 +413,7 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
continue;
did = true;
- std::vector<SPItem*>::iterator element=find(selected.begin(),selected.end(),item);
- if(element != selected.end())
- selected.erase(element);
+ remove(selected.begin(),selected.end(),item);
// remember the position of the item
gint pos = item->getRepr()->position();