IdeIntf, TAChart: Fix errors in fields editor made in r49233 #255bf5782e. Issue #28595.

git-svn-id: trunk@49739 -
This commit is contained in:
juha 2015-09-02 10:10:47 +00:00
parent c910ea98c3
commit f3124b5751
2 changed files with 14 additions and 11 deletions

View File

@ -215,17 +215,19 @@ end;
procedure TDSFieldsEditorFrm.FieldsEditorFrmDestroy(Sender: TObject);
begin
if Assigned(FComponentEditor) and Assigned(LinkDataset) and Assigned(GlobalDesignHook)
and not (csDestroying in LinkDataset.ComponentState) and (FieldsListBox.SelCount > 0) then
begin
if GlobalDesignHook = Nil then
Exit;
if Assigned(FComponentEditor) and Assigned(LinkDataset)
and not (csDestroying in LinkDataset.ComponentState)
and (FieldsListBox.SelCount > 0) then
GlobalDesignHook.SelectOnlyThis(LinkDataset);
GlobalDesignHook.RemoveAllHandlersForObject(Self);
end;
GlobalDesignHook.RemoveAllHandlersForObject(Self);
end;
procedure TDSFieldsEditorFrm.FieldsListBoxDrawItem(Control: TWinControl;
Index: Integer; ARect: TRect; State: TOwnerDrawState);
var fld: TField;
var
fld: TField;
begin
if Index < 0 then Exit;
if not Assigned(FieldsListBox.Items.Objects[Index]) then Exit;

View File

@ -233,12 +233,13 @@ end;
procedure TComponentListEditorForm.FormDestroy(Sender: TObject);
begin
if (FComponentEditor <> nil) and (FParent <> nil) and Assigned(GlobalDesignHook)
and not (csDestroying in FParent.ComponentState) and (ChildrenListBox.SelCount > 0) then
begin
if GlobalDesignHook = Nil then
Exit;
if Assigned(FComponentEditor) and Assigned(FParent)
and not (csDestroying in FParent.ComponentState)
and (ChildrenListBox.SelCount > 0) then
GlobalDesignHook.SelectOnlyThis(FParent);
GlobalDesignHook.RemoveAllHandlersForObject(Self);
end;
GlobalDesignHook.RemoveAllHandlersForObject(Self);
end;
procedure TComponentListEditorForm.miAddClick(Sender: TObject);