From cbbc16493deb8271729e867e25eb89ded0e87133 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 6 Sep 2006 08:53:48 +0000 Subject: [PATCH] fixed double creating hints in OI git-svn-id: trunk@9820 - --- ideintf/idedialogs.pas | 2 +- ideintf/objectinspector.pp | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ideintf/idedialogs.pas b/ideintf/idedialogs.pas index ff65db19eb..1e26499f90 100644 --- a/ideintf/idedialogs.pas +++ b/ideintf/idedialogs.pas @@ -39,7 +39,7 @@ function LazSelectDirectory(const Title: string; const InitialDir: string = '' ): string; var - LazIDESelectDirectory: TIDESelectDirectory;// set by the IDE + LazIDESelectDirectory: TIDESelectDirectory = nil;// set by the IDE InitIDEFileDialog: TInitIDEFileDialog = nil; StoreIDEFileDialog: TStoreIDEFileDialog = nil ; IDEMessageDialog: TIDEMessageDialog = nil; diff --git a/ideintf/objectinspector.pp b/ideintf/objectinspector.pp index daf28cd716..47360c4791 100644 --- a/ideintf/objectinspector.pp +++ b/ideintf/objectinspector.pp @@ -926,18 +926,21 @@ end; function TOICustomPropertyGrid.InitHints: boolean; begin if not ShowHint then exit(false); + Result:=true; - FHintTimer := TTimer.Create(nil); - FHintTimer.Interval := 500; - FHintTimer.Enabled := False; - FHintTimer.OnTimer := @HintTimer; + if FHintTimer=nil then begin + FHintTimer := TTimer.Create(nil); + FHintTimer.Interval := 500; + FHintTimer.Enabled := False; + FHintTimer.OnTimer := @HintTimer; - FHintWindow := THintWindow.Create(Self); + FHintWindow := THintWindow.Create(Self); - FHIntWindow.Visible := False; - FHintWindow.Caption := 'This is a hint window'#13#10'Neat huh?'; - FHintWindow.HideInterval := 4000; - FHintWindow.AutoHide := True; + FHIntWindow.Visible := False; + FHintWindow.Caption := 'This is a hint window'#13#10'Neat huh?'; + FHintWindow.HideInterval := 4000; + FHintWindow.AutoHide := True; + end; end; function TOICustomPropertyGrid.ConsistencyCheck: integer;