diff --git a/src/src/Rendering/Core/DraggableActor.cpp b/src/src/Rendering/Core/DraggableActor.cpp index 6a76ea8..e27776f 100644 --- a/src/src/Rendering/Core/DraggableActor.cpp +++ b/src/src/Rendering/Core/DraggableActor.cpp @@ -109,6 +109,7 @@ void DraggableActor::Transform(float x, float y) { if (this->OnDrag) { OnDrag(renderPoints); } + Modified(); } void DraggableActor::ApplyTransform() { @@ -143,8 +144,11 @@ void DraggableActor::ReleaseGraphicsResources(vtkWindow *window) { int DraggableActor::RenderOverlay(vtkViewport *viewport) { if (BaseDataPoints->GetNumberOfPoints()<=0) return vtkProp::RenderOverlay(viewport); - QString newRenderTime = QString("%1-%2-%3").arg(BaseDataPoints->GetMTime()) - .arg(Renderer->GetMTime()).arg(Renderer->GetActiveCamera()->GetMTime()); + QString rendererSize = QString("rendererSize:%1,%2").arg(Renderer->GetRenderWindow()->GetSize()[0]).arg(Renderer->GetRenderWindow()->GetSize()[1]); + QString newRenderTime = QString("%1-%2-%3-%4").arg(BaseDataPoints->GetMTime()) + .arg(rendererSize).arg(Renderer->GetActiveCamera()->GetMTime()) + .arg(GetMTime()); + if (mRenderTime != newRenderTime) { BuildShape(); diff --git a/src/src/Rendering/Measure/AngleAnnotationActor.cpp b/src/src/Rendering/Measure/AngleAnnotationActor.cpp index 5b57f59..ca1b707 100644 --- a/src/src/Rendering/Measure/AngleAnnotationActor.cpp +++ b/src/src/Rendering/Measure/AngleAnnotationActor.cpp @@ -152,6 +152,7 @@ void AngleAnnotationActor::onMeasureMouseMove(vtkRenderWindowInteractor *iren) { } controlP3->SetWorldPosition(p); this->SetWorldPosition3(p); + Modified(); iren->Render(); } @@ -179,6 +180,7 @@ bool AngleAnnotationActor::onMeasureLeftButtonDown(vtkRenderWindowInteractor *ir this->placedPointCount = 3; controlP2->Highlight(0); } + iren->Render(); return this->placedPointCount < 3; } @@ -209,6 +211,7 @@ void AngleAnnotationActor::controlPointCb(vtkObject *sender, unsigned long event double result[3] = {0, 0, 0}; MapScreenPointToWorld(pos[0], pos[1], this->Renderer, result); BaseDataPoints->SetPoint(index, result); + BaseDataPoints->Modified(); } void AngleAnnotationActor::selfDragCb(vtkObject *, unsigned long, void *data) { diff --git a/src/src/Rendering/Measure/LineAnnotationActor.cpp b/src/src/Rendering/Measure/LineAnnotationActor.cpp index 559a5b1..634158f 100644 --- a/src/src/Rendering/Measure/LineAnnotationActor.cpp +++ b/src/src/Rendering/Measure/LineAnnotationActor.cpp @@ -73,6 +73,7 @@ void LineAnnotationActor::controlPointCb(vtkObject *sender, unsigned long event, double result[3] = {0, 0, 0}; MapScreenPointToWorld(pos[0], pos[1], this->Renderer, result); BaseDataPoints->SetPoint(index, result); + BaseDataPoints->Modified(); } void LineAnnotationActor::selfDragCb(vtkObject *, unsigned long, void *data) { @@ -95,6 +96,7 @@ void LineAnnotationActor::onMeasureMouseMove(vtkRenderWindowInteractor *iren) { MapScreenPointToWorld(x,y,renderer,p); controlP2->SetWorldPosition(p); this->SetWorldPosition2(p); + Modified(); iren->Render(); }