diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-11-09 16:35:12 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2009-11-09 16:35:12 +0200 |
commit | b95f0aa457421831e449f56f36190d68d2d33415 (patch) | |
tree | fc7fecc4dca8da292e4cbed37f62f23b273634d7 /src | |
parent | 11bf7ee394290adb5dff304ecff83e65960ae56e (diff) | |
download | fpGUI-b95f0aa457421831e449f56f36190d68d2d33415.tar.xz |
Huge reduction in time taken to populate Index listbox.
Due to a bug in fpGUI's listbox, the update time was very slow when
populating the listbox. Now time is pretty much instant.
Diffstat (limited to 'src')
-rw-r--r-- | src/HelpFile.pas | 5 | ||||
-rw-r--r-- | src/frm_main.pas | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/HelpFile.pas b/src/HelpFile.pas index b3ee7317..af4a2cb9 100644 --- a/src/HelpFile.pas +++ b/src/HelpFile.pas @@ -446,12 +446,12 @@ end; procedure THelpFile.Open; begin + LogEvent(LogDebug, 'Open File >>'); if not FileExists( _Filename ) then raise EHelpFileException.Create( FileErrorNotFound ); try - _Handle := TFileStream.Create(_FileName, fmOpenRead); - + _Handle := TFileStream.Create(_FileName, fmOpenRead or fmShareDenyWrite); except on E: Exception do raise EHelpFileException.Create(E.Message); @@ -471,6 +471,7 @@ begin //end; _FileSize := GetFileSize(_Filename); + LogEvent(LogDebug, 'Open File <<'); end; procedure THelpFile.Close; diff --git a/src/frm_main.pas b/src/frm_main.pas index 0d1a8495..c6eede46 100644 --- a/src/frm_main.pas +++ b/src/frm_main.pas @@ -966,7 +966,6 @@ begin SetWaitCursor; tmpHelpFiles := TList.Create; -// RBRi Translate if not LoadFiles(FileNames, tmpHelpFiles) then begin ClearWaitCursor; @@ -1344,7 +1343,9 @@ begin LogEvent(LogStartup, ' Display index (count = ' + IntToStr(DisplayedIndex.Count) + ')'); // Now display the final index list + lbIndex.BeginUpdate; lbIndex.Items.Assign( DisplayedIndex ); + lbIndex.EndUpdate; LogEvent(LogStartup, ' Tidy up' ); tmpIndexLists.Free; |