From b3d3fb20503b4f41f48d0cefbd2fda560fe3ee80 Mon Sep 17 00:00:00 2001 From: andrew Date: Fri, 30 Jul 2010 23:06:40 +0000 Subject: [PATCH] * more lhelp state settings git-svn-id: trunk@26917 - --- components/chmhelp/lhelp/lhelpcore.pas | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/components/chmhelp/lhelp/lhelpcore.pas b/components/chmhelp/lhelp/lhelpcore.pas index 822d796606..68146e221c 100644 --- a/components/chmhelp/lhelp/lhelpcore.pas +++ b/components/chmhelp/lhelp/lhelpcore.pas @@ -170,7 +170,6 @@ end; procedure THelpForm.FileMenuOpenItemClick(Sender: TObject); begin - if OpenDialog1.Execute then begin if OpenURL('file://'+OpenDialog1.FileName) = Ord(srSuccess) then @@ -309,10 +308,13 @@ procedure THelpForm.SavePreferences(AIPCName: String); var i: Integer; begin - fConfig.SetValue('Position/Left/Value', Left); - fConfig.SetValue('Position/Top/Value', Top); - fConfig.SetValue('Position/Width/Value', Width); - fConfig.SetValue('Position/Height/Value', Height); + if not (WindowState = wsMaximized) then + begin + fConfig.SetValue('Position/Left/Value', Left); + fConfig.SetValue('Position/Top/Value', Top); + fConfig.SetValue('Position/Width/Value', Width); + fConfig.SetValue('Position/Height/Value', Height); + end; fConfig.SetValue('LastFileOpen/Value', OpenDialog1.FileName); @@ -356,8 +358,8 @@ end; procedure THelpForm.ContentTitleChange(sender: TObject); begin - //if ActivePage = nil then - // Exit; + if ActivePage = nil then + Exit; Caption := 'LHelp - ' + ActivePage.fContentProvider.Title; end;