From cb015f01e75cb3e59b705d5df31841db7d5ad0a9 Mon Sep 17 00:00:00 2001 From: kradchen Date: Thu, 19 Jun 2025 10:14:13 +0800 Subject: [PATCH] fix: fix terminated measure delete bug --- src/src/Interaction/ActorDraggableInteractorStyle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;