fix: fix measure terminate can't stop placing measure bug
This commit is contained in:
@@ -12,3 +12,8 @@ void Measure::SetPlacing(bool p)
|
|||||||
this->Placing = p;
|
this->Placing = p;
|
||||||
MeasureHelper::measuring = Placing;
|
MeasureHelper::measuring = Placing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Measure::onTerminate(vtkRenderWindowInteractor *){
|
||||||
|
this->Placing = false;
|
||||||
|
MeasureHelper::measuring = Placing;
|
||||||
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public:
|
|||||||
virtual bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) { return false; };
|
virtual bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) { return false; };
|
||||||
|
|
||||||
//not used
|
//not used
|
||||||
virtual void onTerminate(vtkRenderWindowInteractor *) {};
|
virtual void onTerminate(vtkRenderWindowInteractor *);
|
||||||
|
|
||||||
bool isMeasurePlacing() {
|
bool isMeasurePlacing() {
|
||||||
return this->Placing;
|
return this->Placing;
|
||||||
|
|||||||
@@ -225,7 +225,3 @@ void OpenPolyAnnotationActor::UpdatePerimeterAndAreaText()
|
|||||||
bool OpenPolyAnnotationActor::Valid() {
|
bool OpenPolyAnnotationActor::Valid() {
|
||||||
return Closed == 0 ? BaseDataPoints->GetNumberOfPoints() > 1 : BaseDataPoints->GetNumberOfPoints() > 2;
|
return Closed == 0 ? BaseDataPoints->GetNumberOfPoints() > 1 : BaseDataPoints->GetNumberOfPoints() > 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpenPolyAnnotationActor::onTerminate(vtkRenderWindowInteractor *){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -38,8 +38,6 @@ public:
|
|||||||
|
|
||||||
bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) override;
|
bool onMeasureLeftButtonUp(vtkRenderWindowInteractor *) override;
|
||||||
|
|
||||||
void onTerminate(vtkRenderWindowInteractor *) override;
|
|
||||||
|
|
||||||
Measure *GetNextMeasure()
|
Measure *GetNextMeasure()
|
||||||
override {
|
override {
|
||||||
auto m = OpenPolyAnnotationActor::New();
|
auto m = OpenPolyAnnotationActor::New();
|
||||||
|
|||||||
Reference in New Issue
Block a user