Skip to content

Commit

Permalink
Making added edges from Python bidirectional for Graph.
Browse files Browse the repository at this point in the history
Also removing an extra print statement.
  • Loading branch information
chebee7i committed May 13, 2012
1 parent 068e461 commit e615606
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python/mycelia/mycelia/nxwrapper.py
Expand Up @@ -214,6 +214,7 @@ def add_edge(self, u, v, attr_dict=None, stop=True, **attr):
if stop:
self.stop_layout()
myid = self.server.add_edge(myid_u, myid_v)
myid = self.server.add_edge(myid_v, myid_u)
if stop:
self.resume_layout()
# bidirectional
Expand All @@ -240,6 +241,7 @@ def remove_edge(self, u, v, stop=True):
if stop:
self.stop_layout()
self.server.delete_edge(myid_u, myid_v)
self.server.delete_edge(myid_v, myid_u)
if stop:
self.resume_layout()

Expand Down
1 change: 0 additions & 1 deletion src/mycelia.cpp
Expand Up @@ -309,7 +309,6 @@ void Mycelia::buildGraphList(MyceliaDataItem* dataItem) const

void Mycelia::drawEdge(const Edge& edge, MyceliaDataItem* dataItem) const
{
std::cout << "\nsource/target = " << edge.source << " " << edge.target << std::endl;
drawEdge(gCopy->getNodePosition(edge.source),
gCopy->getNodePosition(edge.target),
gCopy->getEdgeMaterialFromId(edge.material),
Expand Down

0 comments on commit e615606

Please sign in to comment.