From 06e57f5c75772dcba902e3032c756f79090f3424 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 29 Aug 2016 17:26:50 -0300 Subject: Delete implemented --- Project/Line.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'Project/Line.cpp') diff --git a/Project/Line.cpp b/Project/Line.cpp index 0cc5d11..6c5457e 100644 --- a/Project/Line.cpp +++ b/Project/Line.cpp @@ -284,6 +284,7 @@ bool Line::GetContextMenu(wxMenu& menu) { menu.Append(ID_LINE_REMOVE_NODE, _("Remove node")); } + menu.Append(ID_DELETE, _("Delete line")); return true; } @@ -419,3 +420,13 @@ void Line::UpdateNodes() } } } + +void Line::RemoveParent(Element* parent) +{ + for(int i=0; i<2; i++) { + if(parent == m_parentList[i]) { + m_parentList[i] = NULL; + UpdateSwitchesPosition(); + } + } +} -- cgit