viz: call "mapper->Update()" before and after SetInputData()

pull/12274/head
Alexander Alekhin 6 years ago
parent 59ccf2c9e0
commit 6a6506b02d
  1. 1
      modules/viz/src/widget.cpp

@ -301,6 +301,7 @@ void cv::viz::Widget3D::applyTransform(const Affine3d &transform)
vtkSmartPointer<vtkPolyDataMapper> mapper = vtkPolyDataMapper::SafeDownCast(actor->GetMapper()); vtkSmartPointer<vtkPolyDataMapper> mapper = vtkPolyDataMapper::SafeDownCast(actor->GetMapper());
CV_Assert("Widget doesn't have a polydata mapper" && mapper); CV_Assert("Widget doesn't have a polydata mapper" && mapper);
mapper->Update(); // #10945
VtkUtils::SetInputData(mapper, VtkUtils::TransformPolydata(mapper->GetInput(), transform)); VtkUtils::SetInputData(mapper, VtkUtils::TransformPolydata(mapper->GetInput(), transform));
mapper->Update(); mapper->Update();
} }

Loading…
Cancel
Save