diff --git a/src/src/Interaction/ActorDraggableInteractorStyle.cpp b/src/src/Interaction/ActorDraggableInteractorStyle.cpp index e212cc4..39a3eef 100644 --- a/src/src/Interaction/ActorDraggableInteractorStyle.cpp +++ b/src/src/Interaction/ActorDraggableInteractorStyle.cpp @@ -328,8 +328,9 @@ void ActorDraggableInteractorStyle::Drag() { } void ActorDraggableInteractorStyle::ActiveMeasure(Measure *m) { - if (this->measure && nullptr == m) { + if (this->measure ) { this->measure->onTerminate(this->Interactor); + this->measure->ForceDelete(); } this->measure = m; } @@ -337,6 +338,7 @@ void ActorDraggableInteractorStyle::ActiveMeasure(Measure *m) { void ActorDraggableInteractorStyle::UnActiveMeasure() { if (this->measure) { this->measure->onTerminate(this->Interactor); + this->measure->ForceDelete(); } this->EndMeasure(); this->measure = nullptr;