MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / EraseLinks

Method EraseLinks

ogl/basic.cpp:988–1012  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986}
987
988void wxShape::EraseLinks(wxDC& dc, int attachment, bool recurse)
989{
990 if (!m_visible)
991 return;
992
993 wxNode *current = m_lines.GetFirst();
994 while (current)
995 {
996 wxLineShape *line = (wxLineShape *)current->GetData();
997 if (attachment == -1 || ((line->GetTo() == this && line->GetAttachmentTo() == attachment) ||
998 (line->GetFrom() == this && line->GetAttachmentFrom() == attachment)))
999 line->GetEventHandler()->OnErase(dc);
1000 current = current->GetNext();
1001 }
1002 if (recurse)
1003 {
1004 wxNode *node = m_children.GetFirst();
1005 while (node)
1006 {
1007 wxShape *child = (wxShape *)node->GetData();
1008 child->EraseLinks(dc, attachment, recurse);
1009 node = node->GetNext();
1010 }
1011 }
1012}
1013
1014void wxShape::DrawLinks(wxDC& dc, int attachment, bool recurse)
1015{

Callers 2

OnEndDragLeftMethod · 0.80
OnEndDragRightMethod · 0.80

Calls 1

OnEraseMethod · 0.45

Tested by

no test coverage detected