diff options
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); } |
