graphics32 icon indicating copy to clipboard operation
graphics32 copied to clipboard

Better granularity in layer change notification

Open andersmelander opened this issue 5 years ago • 1 comments

I proposed a new event 'OnScaleShiftChange' because some thing is wrong when using changed in line Layers[i].Changed .. here we force raising a possible heavy opeartions and when the scale changed is not the probleme of the Layer but it must be notified and see if any updating is needed.

  for i := 0 to Layers.Count - 1 do
    Layers[i].OnScaleShiftChange;

Originally posted by @lamdalili in https://github.com/graphics32/graphics32/issues/35#issuecomment-499500783

andersmelander avatar Jun 06 '19 17:06 andersmelander

I think the best solution is to implement OnScaleShiftChange in LayerCollection this helps to avoid redendent usage of OnGetViewportScale and OnGetViewportShift when scalling points

lamdalili avatar Jun 06 '19 18:06 lamdalili