void HierarchyTreeController::DeleteNodesInternal(const HierarchyTreeNode::HIERARCHYTREENODESLIST& nodes) { const HierarchyTreePlatformNode* activePlatform = this->activePlatform; const HierarchyTreeScreenNode* activeScreen = this->activeScreen; HierarchyTreeNode::HIERARCHYTREENODESLIST::const_iterator iter; for (iter = nodes.begin(); iter != nodes.end(); ++iter) { if (activeScreen && activeScreen->GetId() == (*iter)->GetId()) { activeScreen = NULL; this->activeScreenAfterDeleteNodes = NULL; } if (activePlatform && activePlatform->GetId() == (*iter)->GetId()) { activePlatform = NULL; this->activePlatformAfterDeleteNodes = NULL; } HierarchyTreeControlNode* controlNode = dynamic_cast<HierarchyTreeControlNode*>((*iter)); if (controlNode) { UnselectControl(controlNode); DeleteNodesInternal(controlNode->GetChildNodes()); } } }