diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-07-24 23:26:11 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2015-07-24 23:26:11 +0000 |
| commit | 7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5 (patch) | |
| tree | 48cae26bf789b11d79f72efc16a6676f960eaaa6 /src/sp-object.cpp | |
| parent | update to trunk (diff) | |
| parent | 3D box tool: the shift key must not prevent snapping of the vanishing point. ... (diff) | |
| download | inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.tar.gz inkscape-7b6ffd82650ee1e20a53b0631d5c2dddef58e8d5.zip | |
update to trunk
(bzr r12588.1.45)
Diffstat (limited to 'src/sp-object.cpp')
| -rw-r--r-- | src/sp-object.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 343db435e..db66eb3e6 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -357,6 +357,10 @@ int sp_object_compare_position(SPObject const *first, SPObject const *second) return result; } +bool sp_object_compare_position_bool(SPObject const *first, SPObject const *second){ + return sp_object_compare_position(first,second)<0; +} + SPObject *SPObject::appendChildRepr(Inkscape::XML::Node *repr) { if ( !cloned ) { @@ -380,14 +384,14 @@ void SPObject::changeCSS(SPCSSAttr *css, gchar const *attr) sp_repr_css_change(this->getRepr(), css, attr); } -GSList *SPObject::childList(bool add_ref, Action) { - GSList *l = NULL; +std::vector<SPObject*> SPObject::childList(bool add_ref, Action) { + std::vector<SPObject*> l; for ( SPObject *child = firstChild() ; child; child = child->getNext() ) { if (add_ref) { sp_object_ref (child); } - l = g_slist_prepend (l, child); + l.push_back(child); } return l; @@ -717,6 +721,9 @@ void SPObject::invoke_build(SPDocument *document, Inkscape::XML::Node *repr, uns } this->cloned = cloned; + /* Invoke derived methods, if any */ + this->build(document, repr); + if ( !cloned ) { this->document->bindObjectToRepr(this->repr, this); @@ -750,8 +757,6 @@ void SPObject::invoke_build(SPDocument *document, Inkscape::XML::Node *repr, uns g_assert(this->getId() == NULL); } - /* Invoke derived methods, if any */ - this->build(document, repr); /* Signalling (should be connected AFTER processing derived methods */ sp_repr_add_listener(repr, &object_event_vector, this); |
