diff --git a/src/src/Rendering/Measure/Measure.cpp b/src/src/Rendering/Measure/Measure.cpp index 0454df4..4ba5476 100644 --- a/src/src/Rendering/Measure/Measure.cpp +++ b/src/src/Rendering/Measure/Measure.cpp @@ -12,3 +12,8 @@ void Measure::SetPlacing(bool p) this->Placing = p; MeasureHelper::measuring = Placing; } + +void Measure::onTerminate(vtkRenderWindowInteractor *){ + this->Placing = false; + MeasureHelper::measuring = Placing; +} diff --git a/src/src/Rendering/Measure/Measure.h b/src/src/Rendering/Measure/Measure.h index 7227c32..d5a3dfb 100644 --- a/src/src/Rendering/Measure/Measure.h +++ b/src/src/Rendering/Measure/Measure.h @@ -33,7 +33,7 @@ public: virtual bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) { return false; }; //not used - virtual void onTerminate(vtkRenderWindowInteractor *) {}; + virtual void onTerminate(vtkRenderWindowInteractor *); bool isMeasurePlacing() { return this->Placing; diff --git a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp index 0a19124..a0d3b6b 100644 --- a/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp +++ b/src/src/Rendering/Measure/OpenPolyAnnotationActor.cpp @@ -225,7 +225,3 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText() bool OpenPolyAnnotationActor::Valid() { return Closed == 0 ? BaseDataPoints->GetNumberOfPoints() > 1 : BaseDataPoints->GetNumberOfPoints() > 2; } - -void OpenPolyAnnotationActor::onTerminate(vtkRenderWindowInteractor *){ - -} diff --git a/src/src/Rendering/Measure/OpenPolyAnnotationActor.h b/src/src/Rendering/Measure/OpenPolyAnnotationActor.h index daaa0c3..6d5cc88 100644 --- a/src/src/Rendering/Measure/OpenPolyAnnotationActor.h +++ b/src/src/Rendering/Measure/OpenPolyAnnotationActor.h @@ -38,8 +38,6 @@ public: bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) override; - void onTerminate(vtkRenderWindowInteractor *) override; - Measure *GetNextMeasure() override { auto m = OpenPolyAnnotationActor::New();