diff options
| author | Martin Owens <doctormo@gmail.com> | 2013-09-24 16:32:55 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2013-09-24 16:32:55 +0000 |
| commit | cbc44da105ce8ccd6d098ba64218af028f11e38e (patch) | |
| tree | 80df97be8015af36df6a7373e60b457dd5d12b92 /src | |
| parent | Replace xml node get_double with simple direct value. (diff) | |
| download | inkscape-cbc44da105ce8ccd6d098ba64218af028f11e38e.tar.gz inkscape-cbc44da105ce8ccd6d098ba64218af028f11e38e.zip | |
Make sure selection->setList checks for dupes by routing to selection->addList.
Fixed bugs:
- https://launchpad.net/bugs/1229678
(bzr r12586)
Diffstat (limited to 'src')
| -rw-r--r-- | src/selection.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 1335c5fca..aea5f539c 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -238,14 +238,7 @@ void Selection::_remove(SPObject *obj) { void Selection::setList(GSList const *list) { _clear(); - - if ( list != NULL ) { - for ( GSList const *iter = list ; iter != NULL ; iter = iter->next ) { - _add(reinterpret_cast<SPObject *>(iter->data)); - } - } - - _emitChanged(); + addList(list); } void Selection::addList(GSList const *list) { @@ -257,9 +250,7 @@ void Selection::addList(GSList const *list) { for ( GSList const *iter = list ; iter != NULL ; iter = iter->next ) { SPObject *obj = reinterpret_cast<SPObject *>(iter->data); - if (includes(obj)) { - continue; - } + if (includes(obj)) continue; _add (obj); } |
