fix: fix terminated measure delete bug

This commit is contained in:
kradchen
2025-06-19 10:14:13 +08:00
parent 4b3b572bc4
commit cb015f01e7

View File

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