diff options
| author | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2014-03-27 01:33:44 +0000 |
| commit | 5a4fb2325f60d292b47330f540b26a3279341c90 (patch) | |
| tree | d2aa7967be25450b83e625025366c618101ae49f /src/sp-conn-end-pair.cpp | |
| parent | The Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff) | |
| parent | Remove Snap menu item and improve grid menu item text (diff) | |
| download | inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip | |
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to 'src/sp-conn-end-pair.cpp')
| -rw-r--r-- | src/sp-conn-end-pair.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/sp-conn-end-pair.cpp b/src/sp-conn-end-pair.cpp index 17e9e7397..dbd4f2e94 100644 --- a/src/sp-conn-end-pair.cpp +++ b/src/sp-conn-end-pair.cpp @@ -82,9 +82,7 @@ sp_conn_end_pair_build(SPObject *object) { object->readAttr( "inkscape:connector-type" ); object->readAttr( "inkscape:connection-start" ); - object->readAttr( "inkscape:connection-start-point" ); object->readAttr( "inkscape:connection-end" ); - object->readAttr( "inkscape:connection-end-point" ); object->readAttr( "inkscape:connector-curvature" ); } @@ -164,10 +162,6 @@ SPConnEndPair::setAttr(unsigned const key, gchar const *const value) case SP_ATTR_CONNECTION_END: this->_connEnd[(key == SP_ATTR_CONNECTION_START ? 0 : 1)]->setAttacherHref(value, _path); break; - case SP_ATTR_CONNECTION_START_POINT: - case SP_ATTR_CONNECTION_END_POINT: - this->_connEnd[(key == SP_ATTR_CONNECTION_START_POINT ? 0 : 1)]->setAttacherEndpoint(value, _path); - break; } } @@ -175,15 +169,13 @@ SPConnEndPair::setAttr(unsigned const key, gchar const *const value) void SPConnEndPair::writeRepr(Inkscape::XML::Node *const repr) const { - char const * const attr_strs[] = {"inkscape:connection-start", "inkscape:connection-start-point", - "inkscape:connection-end", "inkscape:connection-end-point"}; + char const * const attr_strs[] = {"inkscape:connection-start", "inkscape:connection-end"}; for (unsigned handle_ix = 0; handle_ix < 2; ++handle_ix) { - if (this->_connEnd[handle_ix]->ref.getURI()) { - repr->setAttribute(attr_strs[2*handle_ix], this->_connEnd[handle_ix]->ref.getURI()->toString()); - std::ostringstream ostr; - ostr<<(this->_connEnd[handle_ix]->type == ConnPointDefault ? "d":"u") << - this->_connEnd[handle_ix]->id; - repr->setAttribute(attr_strs[2*handle_ix+1], ostr.str().c_str()); + const Inkscape::URI* U = this->_connEnd[handle_ix]->ref.getURI(); + if (U) { + gchar *str = U->toString(); + repr->setAttribute(attr_strs[handle_ix], str); + g_free(str); } } repr->setAttribute("inkscape:connector-curvature", Glib::Ascii::dtostr(_connCurvature).c_str()); @@ -203,7 +195,7 @@ SPConnEndPair::getAttachedItems(SPItem *h2attItem[2]) const { // selected through the XML editor, it makes sense just to detach // connectors from them. if (SP_IS_GROUP(h2attItem[h])) { - if (SP_GROUP(h2attItem[h])->group->getItemCount() == 0) { + if (SP_GROUP(h2attItem[h])->getItemCount() == 0) { // This group is empty, so detach. sp_conn_end_detach(_path, h); h2attItem[h] = NULL; @@ -222,7 +214,7 @@ void SPConnEndPair::getEndpoints(Geom::Point endPts[]) const for (unsigned h = 0; h < 2; ++h) { if ( h2attItem[h] ) { g_assert(h2attItem[h]->avoidRef); - endPts[h] = h2attItem[h]->avoidRef->getConnectionPointPos(_connEnd[h]->type, _connEnd[h]->id); + endPts[h] = h2attItem[h]->avoidRef->getConnectionPointPos(); } else if (!curve->is_empty()) { |
