Jean-Marc Lasgouttes wrote:
> Le 31 octobre 2017 13:36:47 GMT+01:00, Jean-Marc Lasgouttes 
> <lasgout...@lyx.org> a écrit :
> >Yes 2 is good for fixing the symptom, but it is very fragile...
> 
> We could also try
> 4. Note when we have requested a repaint and exit early from paintEvent() 
> when we did not ask for this repaint. (Or even boldlier do a full 
> metrics+draw).

like this?

int process=0; //0 - not updating; 1 - just in update; >1 update requested 
while in update
fun update(){
  //not a thread safe
  if (process) {process++; return;}
  process++;

  do_updates();

  process--;
  if (process) {process=0; assynchronously_trigger_new_update();}
  
}

Reply via email to