##// END OF EJS Templates
fix a crash with the cursor in debug
trabillard -
r975:de303a265a7e
parent child
Show More
@@ -92,7 +92,7 void VisualizationCursorItem::setVisible(bool value)
92 92 if (value != isVisible()) {
93 93
94 94 if (value) {
95 Q_ASSERT(!impl->m_LineItem && !impl->m_Plot);
95 Q_ASSERT(!impl->m_LineItem && !impl->m_LabelItem);
96 96
97 97 impl->m_LineItem = new QCPItemStraightLine{impl->m_Plot};
98 98 auto pen = QPen{CURSOR_PEN_STYLE};
@@ -118,7 +118,7 void VisualizationCursorItem::setVisible(bool value)
118 118 impl->updateCursorPosition();
119 119 }
120 120 else {
121 Q_ASSERT(impl->m_LineItem && impl->m_Plot);
121 Q_ASSERT(impl->m_LineItem && impl->m_LabelItem);
122 122
123 123 // Note: the items are destroyed by QCustomPlot in removeItem
124 124 impl->m_Plot->removeItem(impl->m_LineItem);
General Comments 0
You need to be logged in to leave comments. Login now