eugeneloza / decoherence

Project moved to https://gitlab.com/EugeneLoza/decoherence
GNU General Public License v3.0
10 stars 7 forks source link

DAbstractImage.ResetToRealSize should alert parent #474

Open eugeneloza opened 6 years ago

eugeneloza commented 6 years ago

This kind of procedures should alert parents to run ArrangeChildren. Not as critical bug as the previous time and theoretically solvable this time, but still gives some headache.

eugeneloza commented 6 years ago

Hmm... practically any SetSize should alert Parent recoursively to rearrange children? kinda

procedure SetSize
Next := ...
SizeHasBeenChanged

procedure SizeHasBeenChanged
if Self is DAbstractSorter then ArrangeChildren;
Parent.SizeHasBeenChanged

Doesn't look nice. Arrange children will be called multiple times recoursively, maybe ending in an infinite loop.

eugeneloza commented 6 years ago

Yep, of course it results in EStackOverflow (child changes size, alerts Arranger, Arranger arranges child and changes its size and repeat :))