fixed TCollectionPropertyEditor deleting TStatuspanel

git-svn-id: trunk@6862 -
This commit is contained in:
mattias 2005-02-28 18:12:36 +00:00
parent b0df60b87e
commit a9f6d6087a
3 changed files with 19 additions and 1 deletions

View File

@ -3474,7 +3474,7 @@ Type
end;
const
CollectionForm : TCollectionPropertyEditorForm = nil;
CollectionForm: TCollectionPropertyEditorForm = nil;
procedure TCollectionPropertyEditorForm.ListClick(Sender: TObject);
begin
@ -3530,6 +3530,7 @@ begin
CollectionListBox.ItemIndex:=NewItemIndex;
SelectInObjectInspector(false);
end;
//debugln('TCollectionPropertyEditorForm.DeleteClick B');
Modified;
end;
end;
@ -3603,6 +3604,7 @@ end;
procedure TCollectionPropertyEditorForm.PersistentDeleting(
APersistent: TPersistent);
begin
//debugln('TCollectionPropertyEditorForm.PersistentDeleting A APersistent=',dbgsName(APersistent),' OwnerPersistent=',dbgsName(OwnerPersistent));
if APersistent=OwnerPersistent then begin
SetCollection(nil,nil,'');
Hide;
@ -3738,6 +3740,7 @@ begin
NewSelection.Add(Collection.Items[i]);
end;
GlobalDesignHook.SetSelection(NewSelection);
GlobalDesignHook.LookupRoot:=GetLookupRootForComponent(OwnerPersistent);
finally
NewSelection.Free;
end;

View File

@ -80,6 +80,7 @@ type
procedure SetIndex(Value: Integer); override;
public
constructor Create(aCollection: TCollection); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
function StatusBar: TStatusBar;
published
@ -2403,6 +2404,9 @@ end.
{ =============================================================================
$Log$
Revision 1.167 2005/02/28 18:12:36 mattias
fixed TCollectionPropertyEditor deleting TStatuspanel
Revision 1.166 2005/02/26 17:08:41 marc
* Reworked listviews to match new interface

View File

@ -26,6 +26,17 @@ begin
inherited Create(aCollection);
end;
destructor TStatusPanel.Destroy;
var
OldStatusBar: TStatusBar;
begin
//debugln('TStatusPanel.Destroy A ',dbgsName(Self),' StatusBar=',dbgsName(StatusBar));
OldStatusBar:=StatusBar;
inherited Destroy;
if OldStatusBar<>nil then
OldStatusBar.InvalidatePanel(-1,[ppText]);
end;
procedure TStatusPanel.Assign(Source: TPersistent);
begin
if Source is TStatusPanel then