summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 35b49e2)
raw | patch | inline | side by side (parent: 35b49e2)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Sat, 11 Feb 2006 01:57:03 +0000 (01:57 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Sat, 11 Feb 2006 01:57:03 +0000 (01:57 +0000) |
Fix two bugs from my commit yesterday.
ChangeLog | patch | blob | history | |
src/conn-avoid-ref.cpp | patch | blob | history | |
src/sp-conn-end-pair.cpp | patch | blob | history |
diff --git a/ChangeLog b/ChangeLog
index e5c6c3a821271da9068f7638e8d77b2e85f40f67..f55fd6ba2992a41c7232bada50e02a45a33c8cad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+2006-02-11 Michael Wybrow <mjwybrow@users.sourceforge.net>
+
+ * src/sp-conn-end-pair.cpp, src/conn-avoid-ref.cpp:
+ Fix two bugs from my commit yesterday.
+
2006-02-10 Michael Wybrow <mjwybrow@users.sourceforge.net>
* src/sp-conn-end-pair.cpp, src/sp-conn-end-pair.h,
diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp
index 8fbdfb6739a97e491fbd77f27f7cdcddaa098566..d7cca60f915f2e27de08e24f584fffb66c3f110c 100644 (file)
--- a/src/conn-avoid-ref.cpp
+++ b/src/conn-avoid-ref.cpp
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;
}
index bb5d89107f521b617b9f4034e093b450a2dede71..5b36f8796b2f6bc752d67e7de0782cf974166c57 100644 (file)
--- a/src/sp-conn-end-pair.cpp
+++ b/src/sp-conn-end-pair.cpp
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 {