ComponentView::~ComponentView () { Component* subj = GetSubject(); if (subj != nil) { subj->Detach(this); } }
static void DetachComponentViews (Editor* ed) { int i = 0; Viewer* viewer; Component* comp = ed->GetComponent(); if (comp != nil) { while ((viewer = ed->GetViewer(i++)) != nil) { GraphicView* gv = viewer->GetGraphicView(); comp->Detach(gv); } } }