裂缝退出崩溃问题。

This commit is contained in:
DESKTOP-450PEFP\mainc 2026-05-20 11:58:58 +08:00
parent 2b68607854
commit 4aed169d4a

View File

@ -318,15 +318,15 @@ DraggableCrackItem::DraggableCrackItem(QCustomPlot *plot, Type type, const QColo
DraggableCrackItem::~DraggableCrackItem() DraggableCrackItem::~DraggableCrackItem()
{ {
if (m_type == TypeA_Sine) { // if (m_type == TypeA_Sine) {
if (m_tracer1) m_plot->removeItem(m_tracer1); // if (m_tracer1) m_plot->removeItem(m_tracer1);
if (m_tracer2) m_plot->removeItem(m_tracer2); // if (m_tracer2) m_plot->removeItem(m_tracer2);
if (m_curve) m_plot->removeItem(m_curve); // if (m_curve) m_plot->removeItem(m_curve);
} else if (m_type == TypeB_Polyline) { // } else if (m_type == TypeB_Polyline) {
clearLines(); // clearLines();
} else if (m_type == TypeC_Closed) { // } else if (m_type == TypeC_Closed) {
clearPolylineC(); // clearPolylineC();
} // }
if (s_activeItem == this) s_activeItem = nullptr; if (s_activeItem == this) s_activeItem = nullptr;
} }