Skip to content

SP5 RenderManager: EnableRendering flag #3213

@swharden

Description

@swharden

For consistency it would be nice to add the RenderLock() and RenderLock() methods for consistency with previous behavior to compliment the PreRenderLock event handler added in #3095

Update: I'm going to add a EnableRendering flag to allow this:

void MyDangerousOperation(){

    // disable new renders
    formsPlot1.Plot.RenderManager.EnableRendering = false;

    // wait for the current render to finish
    while (formsPlot1.Plot.RenderManager.IsRendering) {}

    // perform your dangerous operation
    myScatterPlot.DataSource.Clear();

    // permit new renders
    formsPlot1.Plot.RenderManager.EnableRendering = true;

    // force the plot to redraw
    formsPlot1.Refresh();
}

Note that EnableRendering skips renders while PreRenderLock hangs renders

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions