diff options
| author | Arcadie M. Cracan <acracan@gmail.com> | 2010-02-21 10:40:13 +0000 |
|---|---|---|
| committer | Arcadie M. Cracan <acracan@gmail.com> | 2010-02-21 10:40:13 +0000 |
| commit | a78a295c3c2df3ee1ff480302a2c2bbb4d39c4b4 (patch) | |
| tree | b547269d763a0516219d65c9e73feb9caaa616e6 /src | |
| parent | Make sure that guides always snap correctly when dropping them, and improve p... (diff) | |
| download | inkscape-a78a295c3c2df3ee1ff480302a2c2bbb4d39c4b4.tar.gz inkscape-a78a295c3c2df3ee1ff480302a2c2bbb4d39c4b4.zip | |
Disabled unfinished connection point edit mode. Added inkscape:connection-start-point, inkscape:connection-end-point attributes for connector endpoints. This corrects the previous approach making drawings created in 0.48 version compatible with earlier versions (new attributes are silently ignored).
(bzr r9103.1.1)
Diffstat (limited to 'src')
| -rw-r--r-- | src/attributes.cpp | 4 | ||||
| -rw-r--r-- | src/attributes.h | 4 | ||||
| -rw-r--r-- | src/connector-context.cpp | 76 | ||||
| -rw-r--r-- | src/connector-context.h | 6 | ||||
| -rw-r--r-- | src/sp-conn-end-pair.cpp | 124 | ||||
| -rw-r--r-- | src/sp-conn-end.cpp | 206 | ||||
| -rw-r--r-- | src/sp-conn-end.h | 2 | ||||
| -rw-r--r-- | src/sp-path.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 6 |
9 files changed, 218 insertions, 212 deletions
diff --git a/src/attributes.cpp b/src/attributes.cpp index f4a2a879a..3cfe04fab 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -127,9 +127,11 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_ORIGINAL_D, "inkscape:original-d"}, /* (Note: XML representation of connectors may change in future.) */ {SP_ATTR_CONNECTOR_TYPE, "inkscape:connector-type"}, + {SP_ATTR_CONNECTOR_CURVATURE, "inkscape:connector-curvature"}, {SP_ATTR_CONNECTION_START, "inkscape:connection-start"}, {SP_ATTR_CONNECTION_END, "inkscape:connection-end"}, - {SP_ATTR_CONNECTOR_CURVATURE, "inkscape:connector-curvature"}, + {SP_ATTR_CONNECTION_START_POINT, "inkscape:connection-start-point"}, + {SP_ATTR_CONNECTION_END_POINT, "inkscape:connection-end-point"}, /* SPRect */ {SP_ATTR_RX, "rx"}, {SP_ATTR_RY, "ry"}, diff --git a/src/attributes.h b/src/attributes.h index e3399bc58..c21087e36 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -127,9 +127,11 @@ enum SPAttributeEnum { SP_ATTR_D, SP_ATTR_INKSCAPE_ORIGINAL_D, SP_ATTR_CONNECTOR_TYPE, + SP_ATTR_CONNECTOR_CURVATURE, SP_ATTR_CONNECTION_START, SP_ATTR_CONNECTION_END, - SP_ATTR_CONNECTOR_CURVATURE, + SP_ATTR_CONNECTION_START_POINT, + SP_ATTR_CONNECTION_END_POINT, /* SPRect */ SP_ATTR_RX, SP_ATTR_RY, diff --git a/src/connector-context.cpp b/src/connector-context.cpp index b61c00df6..eed03385c 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -218,7 +218,7 @@ static void cc_set_active_shape(SPConnectorContext *cc, SPItem *item); static void cc_clear_active_shape(SPConnectorContext *cc); static void cc_set_active_conn(SPConnectorContext *cc, SPItem *item); static void cc_clear_active_conn(SPConnectorContext *cc); -static gchar *conn_pt_handle_test(SPConnectorContext *cc, Geom::Point& w); +static bool conn_pt_handle_test(SPConnectorContext *cc, Geom::Point& p, gchar **href, gchar **cpid); static void cc_select_handle(SPKnot* knot); static void cc_deselect_handle(SPKnot* knot); static bool cc_item_is_shape(SPItem *item); @@ -338,8 +338,10 @@ sp_connector_context_init(SPConnectorContext *cc) cc->endpt_handle[i] = NULL; cc->endpt_handler_id[i] = 0; } - cc->sid = NULL; - cc->eid = NULL; + cc->shref = NULL; + cc->scpid = NULL; + cc->ehref = NULL; + cc->ecpid = NULL; cc->npoints = 0; cc->state = SP_CONNECTOR_CONTEXT_IDLE; } @@ -366,13 +368,21 @@ sp_connector_context_dispose(GObject *object) cc->endpt_handle[i] = NULL; } } - if (cc->sid) { - g_free(cc->sid); - cc->sid = NULL; + if (cc->shref) { + g_free(cc->shref); + cc->shref = NULL; } - if (cc->eid) { - g_free(cc->eid); - cc->eid = NULL; + if (cc->scpid) { + g_free(cc->scpid); + cc->scpid = NULL; + } + if (cc->ehref) { + g_free(cc->shref); + cc->shref = NULL; + } + if (cc->ecpid) { + g_free(cc->scpid); + cc->scpid = NULL; } g_assert( cc->newConnRef == NULL ); @@ -570,8 +580,8 @@ cc_clear_active_conn(SPConnectorContext *cc) } -static gchar * -conn_pt_handle_test(SPConnectorContext *cc, Geom::Point& p) +static bool +conn_pt_handle_test(SPConnectorContext *cc, Geom::Point& p, gchar **href, gchar **cpid) { // TODO: this will need to change when there are more connection // points available for each shape. @@ -580,10 +590,13 @@ conn_pt_handle_test(SPConnectorContext *cc, Geom::Point& p) { p = cc->active_handle->pos; const ConnectionPoint& cp = cc->connpthandles[cc->active_handle]; - return g_strdup_printf("#%s_%c_%d", SP_OBJECT_ID(cc->active_shape), - cp.type == ConnPointDefault ? 'd' : 'u' , cp.id); + *href = g_strdup_printf("#%s", SP_OBJECT_ID(cc->active_shape)); + *cpid = g_strdup_printf("%c%d", cp.type == ConnPointDefault ? 'd' : 'u' , cp.id); + return true; } - return NULL; + *href = NULL; + *cpid = NULL; + return false; } static void @@ -769,9 +782,9 @@ connector_handle_button_press(SPConnectorContext *const cc, GdkEventButton const Geom::Point p = event_dt; // Test whether we clicked on a connection point - cc->sid = conn_pt_handle_test(cc, p); + bool found = conn_pt_handle_test(cc, p, &cc->shref, &cc->scpid); - if (!cc->sid) { + if (!found) { // This is the first point, so just snap it to the grid // as there's no other points to go off. m.freeSnapReturnByRef(p, Inkscape::SNAPSOURCE_OTHER_HANDLE); @@ -791,7 +804,7 @@ connector_handle_button_press(SPConnectorContext *const cc, GdkEventButton const spcc_connector_set_subsequent_point(cc, p); spcc_connector_finish_segment(cc, p); // Test whether we clicked on a connection point - cc->eid = conn_pt_handle_test(cc, p); + /*bool found = */conn_pt_handle_test(cc, p, &cc->ehref, &cc->ecpid); if (cc->npoints != 0) { spcc_connector_finish(cc); } @@ -1035,7 +1048,7 @@ connector_handle_button_release(SPConnectorContext *const cc, GdkEventButton con spcc_connector_set_subsequent_point(cc, p); spcc_connector_finish_segment(cc, p); // Test whether we clicked on a connection point - cc->eid = conn_pt_handle_test(cc, p); + /*bool found = */conn_pt_handle_test(cc, p, &cc->ehref, &cc->ecpid); if (cc->npoints != 0) { spcc_connector_finish(cc); } @@ -1265,16 +1278,21 @@ cc_connector_rerouting_finish(SPConnectorContext *const cc, Geom::Point *const p if (p != NULL) { // Test whether we clicked on a connection point - gchar *shape_label = conn_pt_handle_test(cc, *p); + gchar *shape_label, *cpid; + bool found = conn_pt_handle_test(cc, *p, &shape_label, &cpid); - if (shape_label) { + if (found) { if (cc->clickedhandle == cc->endpt_handle[0]) { sp_object_setAttribute(cc->clickeditem, - "inkscape:connection-start",shape_label, false); + "inkscape:connection-start", shape_label, false); + sp_object_setAttribute(cc->clickeditem, + "inkscape:connection-start-point", cpid, false); } else { sp_object_setAttribute(cc->clickeditem, - "inkscape:connection-end",shape_label, false); + "inkscape:connection-end", shape_label, false); + sp_object_setAttribute(cc->clickeditem, + "inkscape:connection-end-point", cpid, false); } g_free(shape_label); } @@ -1417,17 +1435,23 @@ spcc_flush_white(SPConnectorContext *cc, SPCurve *gc) cc->isOrthogonal ? "orthogonal" : "polyline", false); sp_object_setAttribute(cc->newconn, "inkscape:connector-curvature", Glib::Ascii::dtostr(cc->curvature).c_str(), false); - if (cc->sid) + if (cc->shref) { sp_object_setAttribute(cc->newconn, "inkscape:connection-start", - cc->sid, false); + cc->shref, false); + if (cc->scpid) + sp_object_setAttribute(cc->newconn, "inkscape:connection-start-point", + cc->scpid, false); connection = true; } - if (cc->eid) + if (cc->ehref) { sp_object_setAttribute(cc->newconn, "inkscape:connection-end", - cc->eid, false); + cc->ehref, false); + if (cc->ecpid) + sp_object_setAttribute(cc->newconn, "inkscape:connection-end-point", + cc->ecpid, false); connection = true; } // Process pending updates. diff --git a/src/connector-context.h b/src/connector-context.h index 640a03aae..bc16609de 100644 --- a/src/connector-context.h +++ b/src/connector-context.h @@ -103,8 +103,10 @@ struct SPConnectorContext : public SPEventContext { ConnectionPointMap connpthandles; SPKnot *endpt_handle[2]; guint endpt_handler_id[2]; - gchar *sid; - gchar *eid; + gchar *shref; + gchar *scpid; + gchar *ehref; + gchar *ecpid; SPCanvasItem *c0, *c1, *cl0, *cl1; }; diff --git a/src/sp-conn-end-pair.cpp b/src/sp-conn-end-pair.cpp index 98b2aec26..33225f467 100644 --- a/src/sp-conn-end-pair.cpp +++ b/src/sp-conn-end-pair.cpp @@ -81,7 +81,9 @@ sp_conn_end_pair_build(SPObject *object) { sp_object_read_attr(object, "inkscape:connector-type"); sp_object_read_attr(object, "inkscape:connection-start"); + sp_object_read_attr(object, "inkscape:connection-start-point"); sp_object_read_attr(object, "inkscape:connection-end"); + sp_object_read_attr(object, "inkscape:connection-end-point"); sp_object_read_attr(object, "inkscape:connector-curvature"); } @@ -99,31 +101,18 @@ avoid_conn_transformed(Geom::Matrix const */*mp*/, SPItem *moved_item) void SPConnEndPair::setAttr(unsigned const key, gchar const *const value) { - if (key == SP_ATTR_CONNECTOR_TYPE) { - if (value && (strcmp(value, "polyline") == 0 || strcmp(value, "orthogonal") == 0)) { - int newconnType = strcmp(value, "polyline") ? SP_CONNECTOR_ORTHOGONAL : SP_CONNECTOR_POLYLINE; - - if (!_connRef) - { - _connType = newconnType; - Avoid::Router *router = _path->document->router; - GQuark itemID = g_quark_from_string(SP_OBJECT(_path)->id); - _connRef = new Avoid::ConnRef(router, itemID); - switch (newconnType) - { - case SP_CONNECTOR_POLYLINE: - _connRef->setRoutingType(Avoid::ConnType_PolyLine); - break; - case SP_CONNECTOR_ORTHOGONAL: - _connRef->setRoutingType(Avoid::ConnType_Orthogonal); - } - _transformed_connection = _path->connectTransformed( - sigc::ptr_fun(&avoid_conn_transformed)); - } - else - if (newconnType != _connType) + switch (key) + { + case SP_ATTR_CONNECTOR_TYPE: + if (value && (strcmp(value, "polyline") == 0 || strcmp(value, "orthogonal") == 0)) { + int newconnType = strcmp(value, "polyline") ? SP_CONNECTOR_ORTHOGONAL : SP_CONNECTOR_POLYLINE; + + if (!_connRef) { _connType = newconnType; + Avoid::Router *router = _path->document->router; + GQuark itemID = g_quark_from_string(SP_OBJECT(_path)->id); + _connRef = new Avoid::ConnRef(router, itemID); switch (newconnType) { case SP_CONNECTOR_POLYLINE: @@ -132,51 +121,68 @@ SPConnEndPair::setAttr(unsigned const key, gchar const *const value) case SP_CONNECTOR_ORTHOGONAL: _connRef->setRoutingType(Avoid::ConnType_Orthogonal); } - sp_conn_reroute_path(_path); + _transformed_connection = _path->connectTransformed( + sigc::ptr_fun(&avoid_conn_transformed)); } - } - else { - _connType = SP_CONNECTOR_NOAVOID; + else + if (newconnType != _connType) + { + _connType = newconnType; + switch (newconnType) + { + case SP_CONNECTOR_POLYLINE: + _connRef->setRoutingType(Avoid::ConnType_PolyLine); + break; + case SP_CONNECTOR_ORTHOGONAL: + _connRef->setRoutingType(Avoid::ConnType_Orthogonal); + } + sp_conn_reroute_path(_path); + } + } + else { + _connType = SP_CONNECTOR_NOAVOID; - if (_connRef) { - _connRef->removeFromGraph(); - delete _connRef; - _connRef = NULL; - _transformed_connection.disconnect(); + if (_connRef) { + _connRef->removeFromGraph(); + delete _connRef; + _connRef = NULL; + _transformed_connection.disconnect(); + } } - } - return; - } - else if (key == SP_ATTR_CONNECTOR_CURVATURE) { - if (value) { - _connCurvature = g_strtod(value, NULL); - if (_connRef && _connRef->isInitialised()) { - // Redraw the connector, but only if it has been initialised. - sp_conn_reroute_path(_path); + break; + case SP_ATTR_CONNECTOR_CURVATURE: + if (value) { + _connCurvature = g_strtod(value, NULL); + if (_connRef && _connRef->isInitialised()) { + // Redraw the connector, but only if it has been initialised. + sp_conn_reroute_path(_path); + } } - } - return; + break; + case SP_ATTR_CONNECTION_START: + 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; } - unsigned const handle_ix = key - SP_ATTR_CONNECTION_START; - g_assert( handle_ix <= 1 ); - this->_connEnd[handle_ix]->setAttacherHref(value, _path); } 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"}; for (unsigned handle_ix = 0; handle_ix < 2; ++handle_ix) { if (this->_connEnd[handle_ix]->ref.getURI()) { - char const * const attr_strs[] = {"inkscape:connection-start", - "inkscape:connection-end"}; + repr->setAttribute(attr_strs[2*handle_ix], this->_connEnd[handle_ix]->ref.getURI()->toString()); std::ostringstream ostr; - ostr<<this->_connEnd[handle_ix]->ref.getURI()->toString()<<"_"<< - (this->_connEnd[handle_ix]->type == ConnPointDefault ? "d":"u") << - "_" << this->_connEnd[handle_ix]->id; - - - repr->setAttribute(attr_strs[handle_ix], ostr.str().c_str()); + 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()); } } repr->setAttribute("inkscape:connector-curvature", Glib::Ascii::dtostr(_connCurvature).c_str()); @@ -287,25 +293,19 @@ SPConnEndPair::update(void) void SPConnEndPair::storeIds(void) { if (_connEnd[0]->href) { - gchar ** href_strarray = NULL; - href_strarray = g_strsplit(_connEnd[0]->href, "_", 0); // href begins with a '#' which we don't want. - const char *startId = href_strarray[0] + 1; + const char *startId = _connEnd[0]->href + 1; GQuark itemId = g_quark_from_string(startId); _connRef->setEndPointId(Avoid::VertID::src, itemId); - g_strfreev(href_strarray); } else { _connRef->setEndPointId(Avoid::VertID::src, 0); } if (_connEnd[1]->href) { - gchar ** href_strarray = NULL; - href_strarray = g_strsplit(_connEnd[1]->href, "_", 0); // href begins with a '#' which we don't want. - const char *endId = href_strarray[0] + 1; + const char *endId = _connEnd[1]->href + 1; GQuark itemId = g_quark_from_string(endId); _connRef->setEndPointId(Avoid::VertID::tar, itemId); - g_strfreev(href_strarray); } else { _connRef->setEndPointId(Avoid::VertID::tar, 0); diff --git a/src/sp-conn-end.cpp b/src/sp-conn-end.cpp index 224442eb8..3ad6954a2 100644 --- a/src/sp-conn-end.cpp +++ b/src/sp-conn-end.cpp @@ -21,6 +21,9 @@ static void change_endpts(SPCurve *const curve, double const endPos[2]); SPConnEnd::SPConnEnd(SPObject *const owner) : ref(owner), href(NULL), + // Default to center connection endpoint + type(ConnPointDefault), + id(4), _changed_connection(), _delete_connection(), _transformed_connection() @@ -228,9 +231,10 @@ sp_conn_end_deleted(SPObject *, SPObject *const owner, unsigned const handle_ix) // todo: The first argument is the deleted object, or just NULL if // called by sp_conn_end_detach. g_return_if_fail(handle_ix < 2); - char const *const attr_str[] = {"inkscape:connection-start", - "inkscape:connection-end"}; - SP_OBJECT_REPR(owner)->setAttribute(attr_str[handle_ix], NULL); + char const * const attr_strs[] = {"inkscape:connection-start", "inkscape:connection-start-point", + "inkscape:connection-end", "inkscape:connection-end-point"}; + SP_OBJECT_REPR(owner)->setAttribute(attr_strs[2*handle_ix], NULL); + SP_OBJECT_REPR(owner)->setAttribute(attr_strs[2*handle_ix+1], NULL); /* I believe this will trigger sp_conn_end_href_changed. */ } @@ -245,7 +249,9 @@ SPConnEnd::setAttacherHref(gchar const *value, SPPath* /*path*/) { if ( value && href && ( strcmp(value, href) == 0 ) ) { /* No change, do nothing. */ - } else { + } + else + { if (!value) { ref.detach(); @@ -254,138 +260,104 @@ SPConnEnd::setAttacherHref(gchar const *value, SPPath* /*path*/) } else { - - /* References to the connection points have the following format - #svguri_t_id, where #svguri is the id of the item the - connector is attached to, t is the type of the point, which - can be either "d" for default or "u" for user-defined, and - id is the local (inside the item) id of the connection point. - In the case of default points id represents the position on the - item (i.e. Top-Left, Centre-Centre, etc.). - */ - - gchar ** href_strarray = NULL; - if (href) - href_strarray = g_strsplit(href, "_", 0); - gchar ** value_strarray = g_strsplit(value, "_", 0); - - g_free(href); - href = NULL; - - bool changed = false; bool validRef = true; + href = g_strdup(value); + // Now do the attaching, which emits the changed signal. + try { + ref.attach(Inkscape::URI(value)); + } catch (Inkscape::BadURIException &e) { + /* TODO: Proper error handling as per + * http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. (Also needed for + * sp-use.) */ + g_warning("%s", e.what()); + validRef = false; + } - if ( !href_strarray || g_strcmp0(href_strarray[0], value_strarray[0]) != 0 ) + if ( !validRef ) { - // The href has changed, so update it. - changed = true; - // Set the href field, because sp_conn_end_href_changed will need it. - href = g_strdup(value); - // Now do the attaching, which emits the changed signal. - try { - ref.attach(Inkscape::URI(value_strarray[0])); - } catch (Inkscape::BadURIException &e) { - /* TODO: Proper error handling as per - * http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. (Also needed for - * sp-use.) */ - g_warning("%s", e.what()); - validRef = false; - } + ref.detach(); + g_free(href); + href = NULL; } - // Check to see if the connection point changed and update it. - // + } + } +} - if ( !value_strarray[1] ) - { - /* Treat the old references to connection points - as default points that connect to the centre - of the item. - */ - if ( type != ConnPointDefault ) +void +SPConnEnd::setAttacherEndpoint(gchar const *value, SPPath* /*path*/) +{ + + /* References to the connection points have the following format + <t><id>, where t is the type of the point, which + can be either "d" for default or "u" for user-defined, and + id is the local (inside the item) id of the connection point. + In the case of default points id represents the position on the + item (i.e. Top-Left, Center-Center, etc.). + */ + + bool changed = false; + ConnPointType newtype = type; + + if (!value) + { + // Default to center endpoint + type = ConnPointDefault; + id = 4; + } + else + { + switch (value[0]) + { + case 'd': + if ( newtype != ConnPointDefault ) { - type = ConnPointDefault; + newtype = ConnPointDefault; changed = true; } - if ( id != ConnPointPosCC ) + break; + case 'u': + if ( newtype != ConnPointUserDefined) { - id = ConnPointPosCC; + newtype = ConnPointUserDefined; changed = true; } - } - else + break; + default: + g_warning("Bad reference to a connection point."); + } + + int newid = (int) g_ascii_strtod( value+1, 0 ); + if ( id != newid ) + { + id = newid; + changed = true; + } + + // We have to verify that the reference to the + // connection point is a valid one. + + if ( changed ) + { + + // Get the item the connector is attached to + SPItem* item = ref.getObject(); + if ( item ) { - switch (value_strarray[1][0]) - { - case 'd': - if ( type != ConnPointDefault ) - { - type = ConnPointDefault; - changed = true; - } - break; - case 'u': - if ( type != ConnPointUserDefined) - { - type = ConnPointUserDefined; - changed = true; - } - break; - default: - g_warning("Bad reference to a connection point."); - validRef = false; - } - if ( value_strarray[2] ) + if (!item->avoidRef->isValidConnPointId( newtype, newid ) ) { - int newId = (int) g_ascii_strtod( value_strarray[2], 0 ); - if ( id != newId ) - { - id = newId; - changed = true; - } - + g_warning("Bad reference to a connection point."); } else { - // We have a malformed reference to a connection point, - // emit a warning, clear href and detach ref. - changed = true; - g_warning("Bad reference to a connection point.");\ - validRef = false; + type = newtype; + id = newid; } - } - - if ( changed ) - { - // We still have to verify that the reference to the - // connection point is a valid one. - - // Get the item the connector is attached to - SPItem* item = ref.getObject(); - if ( item && !item->avoidRef->isValidConnPointId( type, id ) ) - { - g_warning("Bad reference to a connection point."); - validRef = false; + /* // Update the connector + if (path->connEndPair.isAutoRoutingConn()) { + path->connEndPair.tellLibavoidNewEndpoints(); } -/* else - // Update the connector - if (path->connEndPair.isAutoRoutingConn()) { - path->connEndPair.tellLibavoidNewEndpoints(); - } -*/ - } - - if ( !validRef ) - { - ref.detach(); - g_free(href); - href = NULL; + */ } - else - if (!href) - href = g_strdup(value); - - g_strfreev(href_strarray); - g_strfreev(value_strarray); } } } diff --git a/src/sp-conn-end.h b/src/sp-conn-end.h index 5e9dbb9da..16a611ec4 100644 --- a/src/sp-conn-end.h +++ b/src/sp-conn-end.h @@ -35,6 +35,8 @@ public: sigc::connection _transformed_connection; void setAttacherHref(gchar const *, SPPath *); + void setAttacherEndpoint(gchar const *, SPPath *); + private: SPConnEnd(SPConnEnd const &); diff --git a/src/sp-path.cpp b/src/sp-path.cpp index bbcb25356..54d2a201a 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -298,6 +298,8 @@ sp_path_set(SPObject *object, unsigned int key, gchar const *value) case SP_ATTR_CONNECTOR_CURVATURE: case SP_ATTR_CONNECTION_START: case SP_ATTR_CONNECTION_END: + case SP_ATTR_CONNECTION_START_POINT: + case SP_ATTR_CONNECTION_END_POINT: path->connEndPair.setAttr(key, value); break; default: diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index f17686e5e..f81702f4f 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -499,7 +499,7 @@ static gchar const * ui_descr = " </toolbar>" " <toolbar name='ConnectorToolbar'>" - " <toolitem action='ConnectorEditModeAction' />" +// " <toolitem action='ConnectorEditModeAction' />" " <toolitem action='ConnectorAvoidAction' />" " <toolitem action='ConnectorIgnoreAction' />" " <toolitem action='ConnectorOrthogonalAction' />" @@ -509,8 +509,8 @@ static gchar const * ui_descr = " <toolitem action='ConnectorLengthAction' />" " <toolitem action='ConnectorDirectedAction' />" " <toolitem action='ConnectorOverlapAction' />" - " <toolitem action='ConnectorNewConnPointAction' />" - " <toolitem action='ConnectorRemoveConnPointAction' />" +// " <toolitem action='ConnectorNewConnPointAction' />" +// " <toolitem action='ConnectorRemoveConnPointAction' />" " </toolbar>" "</ui>" |
