summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2009-11-07 16:23:52 +0200
committerGraeme Geldenhuys <graemeg@gmail.com>2009-11-07 16:23:52 +0200
commit8803d6777bfff9a91f6eb648690400407a419753 (patch)
treee829b5192ca0e0d41fd2f1adff1c4e4cdbcb2986
parentc8d97d5f1295720fa6605bd36762296d72ce098c (diff)
downloadfpGUI-8803d6777bfff9a91f6eb648690400407a419753.tar.xz
Double clicking in Index listbox now updates the IndexSeachEdit text too.
-rw-r--r--src/frm_main.pas10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/frm_main.pas b/src/frm_main.pas
index a26e0c72..0d1a8495 100644
--- a/src/frm_main.pas
+++ b/src/frm_main.pas
@@ -558,7 +558,13 @@ end;
procedure TMainForm.lbIndexDoubleClick(Sender: TObject; AButton: TMouseButton;
AShift: TShiftState; const AMousePos: TPoint);
begin
- DisplayTopic(nil);
+ InIndexSearch := True; // prevent edit.OnChange from executing too
+ try
+ IndexSearchEdit.Text := lbIndex.Items[lbIndex.FocusItem];
+ DisplayTopic(nil);
+ finally
+ InIndexSearch := False;
+ end;
end;
procedure TMainForm.lbSearchResultsDoubleClick(Sender: TObject; AButton: TMouseButton;
@@ -577,7 +583,7 @@ var
tmpMatchIndex: longint;
tmpSearchText: string;
i: longint;
-Begin
+begin
if InIndexSearch then
exit;