! If the layer mode (\ref setMode) is set to \ref lmBuffered, this method allows replotting only the layerables on this specific layer, without the need to replot all other layers (as a call to \ref QCustomPlot::replot would do). QCustomPlot also makes sure to replot all layers instead of only this one, if the layer ordering or any layerable-layer-association has changed since the last
| 1196 | \see draw |
| 1197 | */ |
| 1198 | void QCPLayer::replot() |
| 1199 | { |
| 1200 | if (mMode == lmBuffered && !mParentPlot->hasInvalidatedPaintBuffers()) |
| 1201 | { |
| 1202 | if (QSharedPointer<QCPAbstractPaintBuffer> pb = mPaintBuffer.toStrongRef()) |
| 1203 | { |
| 1204 | pb->clear(Qt::transparent); |
| 1205 | drawToPaintBuffer(); |
| 1206 | pb->setInvalidated(false); // since layer is lmBuffered, we know only this layer is on buffer and we can reset invalidated flag |
| 1207 | mParentPlot->update(); |
| 1208 | } else |
| 1209 | qDebug() << Q_FUNC_INFO << "no valid paint buffer associated with this layer"; |
| 1210 | } else |
| 1211 | mParentPlot->replot(); |
| 1212 | } |
| 1213 | |
| 1214 | /*! \internal |
| 1215 |
no test coverage detected