navFocusableButtons doesn't work in TDBNavigator
Original Reporter info from Mantis: EdyKnopfler
-
Reporter name: Éderson Cássio
Original Reporter info from Mantis: EdyKnopfler
- Reporter name: Éderson Cássio
Description:
There is a little bug that prevents the correct button index is passed to BtnClick method. In lcl/include/dbcustomnavigator.inc, line 370, we have:
procedure TDBCustomNavigator.ButtonClickHandler(Sender: TObject);
begin
BtnClick(TDBNavButton(Sender).Index);
end;
I have just modified it to:
procedure TDBCustomNavigator.ButtonClickHandler(Sender: TObject);
begin
if navFocusableButtons in FOptions then
BtnClick(TDBNavFocusableButton(Sender).Index)
else
BtnClick(TDBNavButton(Sender).Index);
end;
Steps to reproduce:
Just set TDBNavigator.Options.navFocusableButtons to True and see that all buttons send the "First" message to the DataSet.
Additional information:
Sorry for not using the SVN, I'd like to use the svn, but I don't know how to do it yet. I'll learn ;)
Mantis conversion info:
- Mantis ID: 24191
- OS: Windows XP
- OS Build: SP3
- Platform: Win32
- Version: 1.0.8
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 40778 (#03ecd2e0)
- Target version: 1.2.0
- LazTarget: 1.2