void GraphicsLinesForCurve::updateAfterCommand (GraphicsScene &scene, const PointStyle &pointStyle, const Point &point) { LOG4CPP_DEBUG_S ((*mainCat)) << "GraphicsLinesForCurve::updateAfterCommand" << " curve=" << m_curveName.toLatin1().data() << " pointCount=" << m_graphicsPoints.count(); GraphicsPoint *graphicsPoint = 0; if (m_graphicsPoints.contains (point.ordinal())) { graphicsPoint = m_graphicsPoints [point.ordinal()]; // Due to ordinal renumbering, the coordinates may belong to some other point so we override // them for consistent ordinal-position mapping. Updating the identifier also was added for // better logging (i.e. consistency between Document and GraphicsScene dumps), but happened // to fix a bug with the wrong set of points getting deleted from Cut and Delete graphicsPoint->setPos (point.posScreen()); graphicsPoint->setData (DATA_KEY_IDENTIFIER, point.identifier()); } else { // Point does not exist in scene so create it graphicsPoint = scene.createPoint (point.identifier (), pointStyle, point.posScreen()); m_graphicsPoints [point.ordinal ()] = graphicsPoint; } // Mark point as wanted ENGAUGE_CHECK_PTR (graphicsPoint); graphicsPoint->setWanted (); }