diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-10-25 10:03:33 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-10-25 10:03:33 +0000 |
| commit | d37444eade200b5e527a89164a39bc2894addf6f (patch) | |
| tree | ca6325f3f2dee50786503cbb3dc0ef623fb89d81 /src/object-set.cpp | |
| parent | Fix test (diff) | |
| download | inkscape-d37444eade200b5e527a89164a39bc2894addf6f.tar.gz inkscape-d37444eade200b5e527a89164a39bc2894addf6f.zip | |
Fix signals
(bzr r15191)
Diffstat (limited to 'src/object-set.cpp')
| -rw-r--r-- | src/object-set.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/object-set.cpp b/src/object-set.cpp index 92bcf6b07..fd0b908d1 100644 --- a/src/object-set.cpp +++ b/src/object-set.cpp @@ -232,13 +232,29 @@ Inkscape::XML::Node *ObjectSet::singleRepr() { return obj ? obj->getRepr() : nullptr; } -void ObjectSet::set(SPObject *object) { +void ObjectSet::set(SPObject *object, bool persist_selection_context) { _clear(); _add(object); - // can't emit signal here due to boolean argument in Selection -// _emitSignals(); + if(dynamic_cast<Inkscape::Selection*>(this)) + return dynamic_cast<Inkscape::Selection*>(this)->_emitChanged(persist_selection_context); +} + +void ObjectSet::setReprList(std::vector<XML::Node*> const &list) { + if(!document()) + return; + clear(); + for (auto iter = list.rbegin(); iter != list.rend(); ++iter) { + SPObject *obj = document()->getObjectById((*iter)->attribute("id")); + if (obj) { + add(obj); + } + } + if(dynamic_cast<Inkscape::Selection*>(this)) + return dynamic_cast<Inkscape::Selection*>(this)->_emitChanged();// } + + Geom::OptRect ObjectSet::bounds(SPItem::BBoxType type) const { return (type == SPItem::GEOMETRIC_BBOX) ? |
