IDE: code context: do not connect idle while destroying

git-svn-id: trunk@40015 -
This commit is contained in:
mattias 2013-01-29 02:19:30 +00:00
parent 31d45f3449
commit 96c80d282d
2 changed files with 5 additions and 2 deletions

View File

@ -75,6 +75,7 @@ type
FProcNameCodeXYPos: TCodeXYPosition;
FSourceEditorTopIndex: integer;
FBtnWidth: integer;
fDestroying: boolean;
procedure CreateHints(const CodeContexts: TCodeContextInfo);
procedure ClearMarksInHints;
function GetHints(Index: integer): TCodeContextItem;
@ -1110,6 +1111,7 @@ end;
procedure TCodeContextFrm.SetIdleConnected(AValue: boolean);
begin
if fDestroying then AValue:=false;
if FIdleConnected=AValue then Exit;
FIdleConnected:=AValue;
if IdleConnected then
@ -1149,7 +1151,8 @@ end;
destructor TCodeContextFrm.Destroy;
begin
Application.RemoveAllHandlersOfObject(Self);
fDestroying:=true;
IdleConnected:=false;
if CodeContextFrm=Self then
CodeContextFrm:=nil;
inherited Destroy;

View File

@ -2262,7 +2262,7 @@ type
FVertical: Boolean;
FOnChange: TNotifyEvent;
function GetAlign: TAlign;
procedure SetAlign(aValue: TAlign);
procedure SetAlign(aValue: TAlign); reintroduce;
procedure SetBands(aValue: TCoolBands);
procedure SetBitmap(aValue: TBitmap);
procedure SetImages(aValue: TCustomImageList);