diff options
| author | mjwybrow <mjwybrow@users.sourceforge.net> | 2006-02-11 01:57:03 +0000 |
|---|---|---|
| committer | mjwybrow <mjwybrow@users.sourceforge.net> | 2006-02-11 01:57:03 +0000 |
| commit | df24f0e2b0a31cd21cf96cb01c4d5eab041c1496 (patch) | |
| tree | 3f2e0551372f46d8dbecde68b841fe102398f891 /src | |
| parent | bug 1412504: infinite loop when moving a word to the left when already at the... (diff) | |
| download | inkscape-df24f0e2b0a31cd21cf96cb01c4d5eab041c1496.tar.gz inkscape-df24f0e2b0a31cd21cf96cb01c4d5eab041c1496.zip | |
* src/sp-conn-end-pair.cpp, src/conn-avoid-ref.cpp:
Fix two bugs from my commit yesterday.
(bzr r117)
Diffstat (limited to 'src')
| -rw-r--r-- | src/conn-avoid-ref.cpp | 6 | ||||
| -rw-r--r-- | src/sp-conn-end-pair.cpp | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 8fbdfb673..d7cca60f9 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -120,9 +120,9 @@ GSList *SPAvoidRef::getAttachedConnectors(const unsigned int type) Avoid::IntList::iterator finish = conns.end(); for (Avoid::IntList::iterator i = conns.begin(); i != finish; ++i) { const gchar *connId = g_quark_to_string(*i); - SPItem *item = SP_ITEM(item->document->getObjectById(connId)); - g_assert(item != NULL); - list = g_slist_prepend(list, item); + SPItem *citem = SP_ITEM(item->document->getObjectById(connId)); + g_assert(citem != NULL); + list = g_slist_prepend(list, citem); } return list; } diff --git a/src/sp-conn-end-pair.cpp b/src/sp-conn-end-pair.cpp index bb5d89107..5b36f8796 100644 --- a/src/sp-conn-end-pair.cpp +++ b/src/sp-conn-end-pair.cpp @@ -220,14 +220,18 @@ SPConnEndPair::update(void) void SPConnEndPair::storeIds(void) { if (_connEnd[0]->href) { - GQuark itemId = g_quark_from_string(_connEnd[0]->href); + // href begins with a '#' which we don't want. + const char *startId = _connEnd[0]->href + 1; + GQuark itemId = g_quark_from_string(startId); _connRef->setEndPointId(Avoid::VertID::src, itemId); } else { _connRef->setEndPointId(Avoid::VertID::src, 0); } if (_connEnd[1]->href) { - GQuark itemId = g_quark_from_string(_connEnd[1]->href); + // href begins with a '#' which we don't want. + const char *endId = _connEnd[1]->href + 1; + GQuark itemId = g_quark_from_string(endId); _connRef->setEndPointId(Avoid::VertID::tar, itemId); } else { |
