Designer: minor refactoring, remove PersistentIsMarkedForDeletion method.

git-svn-id: trunk@46071 -
This commit is contained in:
juha 2014-08-24 15:58:01 +00:00
parent bdbccce289
commit b6da8dd7a5

View File

@ -196,7 +196,6 @@ type
procedure DoSelectAll;
procedure DoDeletePersistent(APersistent: TPersistent; FreeIt: boolean);
procedure MarkPersistentForDeletion(APersistent: TPersistent);
function PersistentIsMarkedForDeletion(APersistent: TPersistent): boolean;
function GetSelectedComponentClass: TRegisteredComponent;
procedure NudgePosition(DiffX, DiffY: Integer);
procedure NudgeSize(DiffX, DiffY: Integer);
@ -2856,8 +2855,7 @@ begin
Form.Invalidate;
end;
procedure TDesigner.DoDeletePersistent(APersistent: TPersistent;
FreeIt: boolean);
procedure TDesigner.DoDeletePersistent(APersistent: TPersistent; FreeIt: boolean);
var
Hook: TPropertyEditorHook;
AComponent: TComponent;
@ -2905,16 +2903,10 @@ end;
procedure TDesigner.MarkPersistentForDeletion(APersistent: TPersistent);
begin
if (not PersistentIsMarkedForDeletion(APersistent)) then
if DeletingPersistent.IndexOf(APersistent) = -1 then
DeletingPersistent.Add(APersistent);
end;
function TDesigner.PersistentIsMarkedForDeletion(APersistent: TPersistent
): boolean;
begin
Result:=(DeletingPersistent.IndexOf(APersistent)>=0);
end;
function TDesigner.GetSelectedComponentClass: TRegisteredComponent;
begin
Result:=nil;