zeljko wrote 8 lines
On 02/14/2016 03:01 PM, zeljko wrote:
> In that revision you added RecreateWnd() for modal forms. Why ? Now in
> console we have warnings about it... IMO:
> 1.it's wrong to call RecreateWnd() if handle isn't allocated yet
There shuold be added if (popupMode = pmNone) and HandleAllocated,
otherwise call just needed routines from RecreateWnd() like
UpdateControlState
Yes, you are right. Thanks for reporting!
RecreateWnd is needed because TCustomForm.GetRealPopupParent result changes for PopupMode=pmNode after change from non-modal to modal window (fsModal in FormState).
Fixed in r51631, I also tested it without HandleNeeded, it seems to work well, no problem that the handle is allocated on-demand. So I removed it. If there'll be any problems, we can remember to write HandleNeeded back.
Ondrej