LCL: fixed TCustomListViewEditor.Create override and TLazAccessibleObject.RemoveChildAccessibleObject if object is not in tree

git-svn-id: trunk@35376 -
This commit is contained in:
mattias 2012-02-15 15:26:07 +00:00
parent bf68067f24
commit c6dfe9276c
3 changed files with 9 additions and 5 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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