mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 03:19:43 +02:00
LCL: fixed TCustomListViewEditor.Create override and TLazAccessibleObject.RemoveChildAccessibleObject if object is not in tree
git-svn-id: trunk@35376 -
This commit is contained in:
parent
bf68067f24
commit
c6dfe9276c
@ -1249,7 +1249,7 @@ type
|
|||||||
protected
|
protected
|
||||||
procedure DoExit; override;
|
procedure DoExit; override;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent);
|
constructor Create(AOwner: TComponent); override;
|
||||||
property Item: TListItem read FItem write FItem;
|
property Item: TListItem read FItem write FItem;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -212,8 +212,9 @@ var
|
|||||||
begin
|
begin
|
||||||
if FChildrenSortedForDataObject = nil then Exit;
|
if FChildrenSortedForDataObject = nil then Exit;
|
||||||
Node:=FChildrenSortedForDataObject.Find(AObject);
|
Node:=FChildrenSortedForDataObject.Find(AObject);
|
||||||
|
if Node=nil then exit;
|
||||||
FChildrenSortedForDataObject.Delete(Node);
|
FChildrenSortedForDataObject.Delete(Node);
|
||||||
if (Node<>nil) and AFreeObject then
|
if AFreeObject then
|
||||||
AObject.Free;
|
AObject.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -320,9 +320,12 @@ begin
|
|||||||
if Assigned(Owner) and Assigned(Owner.Owner) then
|
if Assigned(Owner) and Assigned(Owner.Owner) then
|
||||||
begin
|
begin
|
||||||
lOwnerAccessibleObject := Owner.Owner.GetAccessibleObject();
|
lOwnerAccessibleObject := Owner.Owner.GetAccessibleObject();
|
||||||
lAccessibleObject := lOwnerAccessibleObject.GetChildAccessibleObjectWithDataObject(Self);
|
if lOwnerAccessibleObject<>nil then
|
||||||
if lAccessibleObject <> nil then
|
begin
|
||||||
lOwnerAccessibleObject.RemoveChildAccessibleObject(lAccessibleObject);
|
lAccessibleObject := lOwnerAccessibleObject.GetChildAccessibleObjectWithDataObject(Self);
|
||||||
|
if lAccessibleObject <> nil then
|
||||||
|
lOwnerAccessibleObject.RemoveChildAccessibleObject(lAccessibleObject);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// delete children
|
// delete children
|
||||||
|
Loading…
Reference in New Issue
Block a user