Fix BitBtn Kind property with ShowModal
Original Reporter info from Mantis: Tarnyko
-
Reporter name:
Original Reporter info from Mantis: Tarnyko
- Reporter name:
Description:
Please find attached a patch which fixes the following issue :
When we set the Kind property of a BitBtn, to "bkYes" e.g., and its parent Form is in a modal state ; clicking the button is normally supposed to close the Form and return the modal result value ("mrYes" e.g.).
Here, it does not work because the ModalResult property is never positioned at design time by the SetKind() function. This patch fixes this by reorganizing function calls.
Steps to reproduce:
To reproduce the issue, you can download the following test case :
http://www.tarnyko.net/repo/BitBtnKind_bug.zip
Just extract it and compile it ; if you are on Windows, you can directly run "compile-delphi.bat" or "compile-lazarus.bat" (you may want edit this last script to change the %LAZPATH% variable).
Notice that with Delphi, clicking on buttons gives feedback, whereas it does not with Lazarus until you apply the patch.
Mantis conversion info:
- Mantis ID: 32679
- OS: Windows XP/7, Linux RHEL7
- OS Build: XPSP2/7SP1, 7.0
- Platform: Windows, Linux
- Version: 1.9 (SVN)
- Monitored by: » @FTurtle (FTurtle)