------------------------------------------------------------------------------
| 230 | |
| 231 | //------------------------------------------------------------------------------ |
| 232 | void vtkCameraPathWidget::EndSelectAction(vtkAbstractWidget* w) |
| 233 | { |
| 234 | vtkCameraPathWidget* self = reinterpret_cast<vtkCameraPathWidget*>(w); |
| 235 | if (self->WidgetState == vtkCameraPathWidget::Start) |
| 236 | { |
| 237 | return; |
| 238 | } |
| 239 | |
| 240 | // compute some info we need for all cases |
| 241 | int X = self->Interactor->GetEventPosition()[0]; |
| 242 | int Y = self->Interactor->GetEventPosition()[1]; |
| 243 | |
| 244 | // Okay, adjust the representation |
| 245 | double e[2]; |
| 246 | e[0] = static_cast<double>(X); |
| 247 | e[1] = static_cast<double>(Y); |
| 248 | |
| 249 | self->WidgetRep->EndWidgetInteraction(e); |
| 250 | |
| 251 | // Return state to not active |
| 252 | self->WidgetState = vtkCameraPathWidget::Start; |
| 253 | reinterpret_cast<vtkCameraPathRepresentation*>(self->WidgetRep) |
| 254 | ->SetInteractionState(vtkCameraPathRepresentation::Outside); |
| 255 | self->ReleaseFocus(); |
| 256 | |
| 257 | self->EventCallbackCommand->SetAbortFlag(1); |
| 258 | self->EndInteraction(); |
| 259 | self->InvokeEvent(vtkCommand::EndInteractionEvent, nullptr); |
| 260 | self->Render(); |
| 261 | } |
| 262 | |
| 263 | //------------------------------------------------------------------------------ |
| 264 | void vtkCameraPathWidget::CreateDefaultRepresentation() |
nothing calls this directly
no test coverage detected