mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-03 14:59:57 +01:00
IdeIntf, TAChart: Fix errors in fields editor made in r49233 #255bf5782e. Issue #28595.
git-svn-id: trunk@49739 -
This commit is contained in:
parent
c910ea98c3
commit
f3124b5751
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user