From 8803d6777bfff9a91f6eb648690400407a419753 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Sat, 7 Nov 2009 16:23:52 +0200 Subject: Double clicking in Index listbox now updates the IndexSeachEdit text too. --- src/frm_main.pas | 10 ++++++++-- 1 file 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; -- cgit v1.2.3-70-g09d2