From bf26c1cb6feedab295da4823ef571a7e66fc36ed Mon Sep 17 00:00:00 2001 From: mjwybrow Date: Fri, 10 Feb 2006 04:23:35 +0000 Subject: * src/sp-conn-end-pair.cpp, src/sp-conn-end-pair.h, src/conn-avoid-ref.cpp, src/conn-avoid-ref.h, src/libavoid/connector.cpp, src/libavoid/connector.h, src/libavoid/visibility.cpp: Add some code to allow querying of items and connectors to find out what is attached to them. This will allow graph layout algorithms (currently being work on by Tim Dwyer) to determine a graph structure from the diagram. (bzr r107) --- src/libavoid/visibility.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/libavoid/visibility.cpp') diff --git a/src/libavoid/visibility.cpp b/src/libavoid/visibility.cpp index 84e38037d..6154bd396 100644 --- a/src/libavoid/visibility.cpp +++ b/src/libavoid/visibility.cpp @@ -26,7 +26,9 @@ #include "libavoid/shape.h" #include "libavoid/debug.h" #include "libavoid/visibility.h" +#include "libavoid/vertices.h" #include "libavoid/graph.h" +#include "libavoid/geometry.h" #include @@ -602,7 +604,9 @@ void vertexSweep(VertInf *vert) EdgeSet::iterator ePtr; if (prevDir == BEHIND) { - ePtr = e.find(prevPair); + // XXX: Strangely e.find does not return the correct results. + // ePtr = e.find(prevPair); + ePtr = std::find(e.begin(), e.end(), prevPair); if (ePtr != e.end()) { e.erase(ePtr); @@ -625,7 +629,9 @@ void vertexSweep(VertInf *vert) if (nextDir == BEHIND) { - ePtr = e.find(nextPair); + // XXX: Strangely e.find does not return the correct results. + // ePtr = e.find(nextPair); + ePtr = std::find(e.begin(), e.end(), nextPair); if (ePtr != e.end()) { e.erase(ePtr); -- cgit v1.2.3