diff options
| author | mjwybrow <mjwybrow@users.sourceforge.net> | 2006-02-10 04:23:35 +0000 |
|---|---|---|
| committer | mjwybrow <mjwybrow@users.sourceforge.net> | 2006-02-10 04:23:35 +0000 |
| commit | bf26c1cb6feedab295da4823ef571a7e66fc36ed (patch) | |
| tree | 1c99174b02c8a3c84d4f53403d16b3978bd23e3b /src/libavoid/visibility.cpp | |
| parent | Add unit conversion. (diff) | |
| download | inkscape-bf26c1cb6feedab295da4823ef571a7e66fc36ed.tar.gz inkscape-bf26c1cb6feedab295da4823ef571a7e66fc36ed.zip | |
* 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)
Diffstat (limited to 'src/libavoid/visibility.cpp')
| -rw-r--r-- | src/libavoid/visibility.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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 <math.h> @@ -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); |
