diff options
| author | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-12 21:08:21 +0000 |
|---|---|---|
| committer | Adrian Boguszewski <adrbogus1@student.pg.gda.pl> | 2016-06-12 21:08:21 +0000 |
| commit | 4f3e8770859705cb80bb38ec57348677d57b7e36 (patch) | |
| tree | 9c1292a14973e689a0dc486ce5a3c7a1d395b821 /src/object-set.cpp | |
| parent | Added return value to remove (diff) | |
| parent | Fix faulty comparison function. (diff) | |
| download | inkscape-4f3e8770859705cb80bb38ec57348677d57b7e36.tar.gz inkscape-4f3e8770859705cb80bb38ec57348677d57b7e36.zip | |
Replaced old selection containers
(bzr r14954.1.6)
Diffstat (limited to 'src/object-set.cpp')
| -rw-r--r-- | src/object-set.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/object-set.cpp b/src/object-set.cpp index ba7999c19..8aaa68e70 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -18,13 +18,14 @@ bool ObjectSet::add(SPObject* object) { return false; } + // very nice function, but needs refinement // check if there is mutual ancestor for some elements, which can replace all of them in the set - SPObject* o = _getMutualAncestor(object); +// object = _getMutualAncestor(object); // remove all descendants from the set - _removeDescendantsFromSet(o); + _removeDescendantsFromSet(object); - _add(o); + _add(object); return true; } @@ -132,3 +133,11 @@ void ObjectSet::_removeAncestorsFromSet(SPObject *object) { ObjectSet::~ObjectSet() { clear(); } + +multi_index_container::iterator ObjectSet::begin() { + return container.begin(); +} + +multi_index_container::iterator ObjectSet::end() { + return container.end(); +} |
