------------------------------------------------------------------------------
| 85 | |
| 86 | //------------------------------------------------------------------------------ |
| 87 | void vtkAnnotationLink::SetAnnotationLayers(vtkAnnotationLayers* layers) |
| 88 | { |
| 89 | // This method is a cut and paste of vtkCxxSetObjectMacro |
| 90 | // except that we listen for modified events from the annotations layers |
| 91 | if (layers != this->AnnotationLayers) |
| 92 | { |
| 93 | vtkAnnotationLayers* tmp = this->AnnotationLayers; |
| 94 | if (tmp) |
| 95 | { |
| 96 | tmp->RemoveObserver(this->Observer); |
| 97 | } |
| 98 | this->AnnotationLayers = layers; |
| 99 | if (this->AnnotationLayers != nullptr) |
| 100 | { |
| 101 | this->AnnotationLayers->Register(this); |
| 102 | this->AnnotationLayers->AddObserver(vtkCommand::ModifiedEvent, this->Observer); |
| 103 | } |
| 104 | if (tmp != nullptr) |
| 105 | { |
| 106 | tmp->UnRegister(this); |
| 107 | } |
| 108 | this->Modified(); |
| 109 | this->InvokeEvent(vtkCommand::AnnotationChangedEvent, this->AnnotationLayers); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | //------------------------------------------------------------------------------ |
| 114 | void vtkAnnotationLink::AddDomainMap(vtkTable* map) |
no test coverage detected