fix: fix a measure terminate caused crash bug
This commit is contained in:
@@ -354,6 +354,7 @@ void ActorDraggableInteractorStyle::UnActiveMeasure() {
|
|||||||
if (this->measure) {
|
if (this->measure) {
|
||||||
this->measure->onTerminate(this->Interactor);
|
this->measure->onTerminate(this->Interactor);
|
||||||
this->measure->ForceDelete();
|
this->measure->ForceDelete();
|
||||||
|
this->measure = nullptr;
|
||||||
}
|
}
|
||||||
this->EndMeasure();
|
this->EndMeasure();
|
||||||
this->measure = nullptr;
|
this->measure = nullptr;
|
||||||
|
|||||||
@@ -1153,6 +1153,7 @@ void DICOMImageViewer::ClearCurrentSliceMeasure() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DICOMImageViewer::AddMeasures(vtkObject *, unsigned long eventid, void *calldata) {
|
void DICOMImageViewer::AddMeasures(vtkObject *, unsigned long eventid, void *calldata) {
|
||||||
|
if (!calldata) return ;
|
||||||
auto m = static_cast<Measure *>(calldata);
|
auto m = static_cast<Measure *>(calldata);
|
||||||
if (m->Valid()) {
|
if (m->Valid()) {
|
||||||
measureStore->Store(SERIES_UID, this->SliceIJK, this->ImageMapper->GetSliceNumber(), m);
|
measureStore->Store(SERIES_UID, this->SliceIJK, this->ImageMapper->GetSliceNumber(), m);
|
||||||
|
|||||||
Reference in New Issue
Block a user