QCustomPlot Discussion and Comments

about QCPLayer replotReturn to overview

in

QCPLayer:replot {
if(mMode==lmBuffer && !mParent->hasInvalidatedPaintBuffers())
{.....}
else if(mMode==lmLogical) 
{...}
}

Do nothing when (mMode==lmBuffer && mParent->hasInvalidatedPaintBuffers). I am puzzled by this design. Could anybody tell me why?

I have a graph in the main layer, when I set the graph visible, I add it into the legend, when not visible, remove it from legend. (I set all layers lmBuffer)
The problem is when I toggle the graph visibility, add to/remove from the legend, and call layer("main")->replot(), the legend layer PaintBuffers is invalided and the graph visibility do not work.