summaryrefslogtreecommitdiffstats
path: root/Project/Machines.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Project/Machines.cpp')
-rw-r--r--Project/Machines.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Project/Machines.cpp b/Project/Machines.cpp
index 6377f08..cde5933 100644
--- a/Project/Machines.cpp
+++ b/Project/Machines.cpp
@@ -142,7 +142,9 @@ void Machines::RotateNode(Element* parent, bool clockwise)
void Machines::RemoveParent(Element* parent)
{
if(parent == m_parentList[0]) {
+ m_parentList[0]->RemoveChild(this);
m_parentList[0] = NULL;
+ m_online = false;
UpdateSwitchesPosition();
UpdatePowerFlowArrowsPosition();
}