Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
670
Using "ultraChart1->InvalidateLayers();" allows my program to continue instantly...before it has updated the graph
posted

Major problem here

We have point clouds of over 1/4 million points and it takes ultrachart over 10 seconds to update the chart sadly (custom fillscenegraph stuff)

The problem is that InvalidateLayers(); returns IMEDIATLY and i have no way to know when you have finished

This behaviour causes users to believe the chart is up to date because my cursor says so
And they merrily try to do stuff they cant yet.

mainCursor(1): // my routine to show busy
UltraChart1->InvalidateLayers();
mainCursor(0); // my routine to show not busy

Is there any overrides or dot net tricks to stop after InvalidateLayers() that you can help me with
Short of doing Application::DoEvents :¬(

Many thanks


Parents
  • 469350
    Verified Answer
    Offline posted

    HI Mac,

    My guess is that the InvalidateLayers method just invalidates the layers, which is to say it marks the layers as dirty and needing to be updated, but doesn't synchronously perform that refresh. The actual refresh probably occurs the next time the control paints.

    So one thing you could do is hook into the Paint event immediately before or after calling InvalidateLayers and presumably the refresh should be complete at the point where Paint fires.

    Another option would be to call Update or Refresh on the control. Update will force an invalidating control to paint synchronously. Refresh is a slightly more powerful version, both invalidating and forcing a paint. My guess is that you don't need to invalidate, since the InvalidateLayers probably does that for you, but if Update doesn't work, try Refresh in case I am wrong.

Reply Children