fix: fix measure terminate can't stop placing measure bug

This commit is contained in:
kradchen
2025-07-07 10:16:57 +08:00
parent 6ea11c8834
commit ec52a0c86c
4 changed files with 6 additions and 7 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -225,7 +225,3 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText()
bool OpenPolyAnnotationActor::Valid() {
return Closed == 0 ? BaseDataPoints->GetNumberOfPoints() > 1 : BaseDataPoints->GetNumberOfPoints() > 2;
}
void OpenPolyAnnotationActor::onTerminate(vtkRenderWindowInteractor *){
}

View File

@@ -38,8 +38,6 @@ public:
bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) override;
void onTerminate(vtkRenderWindowInteractor *) override;
Measure *GetNextMeasure()
override {
auto m = OpenPolyAnnotationActor::New();