[Patch] TCustomEdit and CharCase
Original Reporter info from Mantis: biloky @biloky
-
Reporter name: Joeny Ang
Original Reporter info from Mantis: biloky @biloky
- Reporter name: Joeny Ang
Description:
When CharCase is either ecUpperCase or ecLowerCase:
- Assigning a value to Text will trigger OnChange() twice
- Inside OnChange(), assigning a value to Text will infinitely trigger OnChange()
Patch:
- changed FTextChangedByRealSetText and FTextChangedLock to integer, incrementing/decrementing them to preserve value, because OnChange() can be recursively triggered
- discards all OnChange() calls inside TCustomEdit.RealSetText() and trigger CM_TEXTCHANGED ourself
- added upper/lower case check in TCustomEdit.RealSetText() to prevent infinite OnChange() calls
Tested OK with the test project of accorp from issue #32630 (closed).
This might be related to issue #32602.