fix: fix terminated measure delete bug
This commit is contained in:
@@ -328,8 +328,9 @@ void ActorDraggableInteractorStyle::Drag() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ActorDraggableInteractorStyle::ActiveMeasure(Measure *m) {
|
void ActorDraggableInteractorStyle::ActiveMeasure(Measure *m) {
|
||||||
if (this->measure && nullptr == m) {
|
if (this->measure ) {
|
||||||
this->measure->onTerminate(this->Interactor);
|
this->measure->onTerminate(this->Interactor);
|
||||||
|
this->measure->ForceDelete();
|
||||||
}
|
}
|
||||||
this->measure = m;
|
this->measure = m;
|
||||||
}
|
}
|
||||||
@@ -337,6 +338,7 @@ void ActorDraggableInteractorStyle::ActiveMeasure(Measure *m) {
|
|||||||
void ActorDraggableInteractorStyle::UnActiveMeasure() {
|
void ActorDraggableInteractorStyle::UnActiveMeasure() {
|
||||||
if (this->measure) {
|
if (this->measure) {
|
||||||
this->measure->onTerminate(this->Interactor);
|
this->measure->onTerminate(this->Interactor);
|
||||||
|
this->measure->ForceDelete();
|
||||||
}
|
}
|
||||||
this->EndMeasure();
|
this->EndMeasure();
|
||||||
this->measure = nullptr;
|
this->measure = nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user