invisible selected persistents are no longer drawn with grabbers

git-svn-id: trunk@5730 -
This commit is contained in:
mattias 2004-08-04 08:50:23 +00:00
parent 5d5266b9f3
commit 7bf089b375
4 changed files with 19 additions and 14 deletions

View File

@ -113,6 +113,7 @@ type
FIsTComponent: boolean;
FIsTControl: boolean;
FIsTWinControl: boolean;
FIsVisible: boolean;
FMarkerPaintedBounds: TRect;
FOldFormRelativeLeftTop: TPoint;
FOldHeight: integer;
@ -159,6 +160,7 @@ type
read FOldFormRelativeLeftTop write FOldFormRelativeLeftTop;
property Flags: TSelectedControlFlags read FFlags write FFlags;
property UseCache: boolean read FUseCache write SetUseCache;
property IsVisible: boolean read FIsVisible;
property IsTComponent: boolean read FIsTComponent;
property IsTControl: boolean read FIsTControl;
property IsTWinControl: boolean read FIsTWinControl;
@ -548,6 +550,8 @@ begin
FIsNonVisualComponent:=FIsTComponent and (not FIsTControl);
if FIsTComponent then
FDesignerForm:=GetDesignerForm(TComponent(FPersistent));
FIsVisible:=FIsTComponent
and (not ComponentIsInvisible(TComponent(APersistent)));
end;
destructor TSelectedControl.Destroy;
@ -2056,7 +2060,8 @@ var
end;
begin
if (Count=0) or (FForm=nil) or LookupRootSelected then exit;
if (Count=0) or (FForm=nil) or LookupRootSelected
or OnlyInvisiblePersistensSelected then exit;
Diff:=DC.FormOrigin;
@ -2117,7 +2122,7 @@ begin
if not Items[i].IsTComponent then continue;
AComponent:=TComponent(Items[i].Persistent);
if (AComponent=FLookupRoot)
or ComponentIsInvisible(AComponent) then continue;
or (not Items[i].IsVisible) then continue;
DoDrawMarker(i,DC);
end;
end;
@ -2171,8 +2176,7 @@ begin
or (AComponent=FLookupRoot) then exit;
i:=IndexOf(AComponent);
if i<0 then exit;
if ComponentIsInvisible(AComponent) then exit;
DoDrawMarker(i,DC);
end;
@ -2404,8 +2408,7 @@ begin
if cssOnlyInvisibleNeedsUpdate in FStates then begin
Result:=true;
for i:=0 to FControls.Count-1 do begin
if (not Items[i].IsTComponent)
or (not ComponentIsInvisible(TComponent(Items[i].Persistent))) then begin
if Items[i].IsVisible then begin
Result:=false;
break;
end;

View File

@ -284,7 +284,7 @@ begin
Invisible:=(csNoDesignVisible in AControl.ControlStyle)
end else begin
RegComp:=FindComponent(AComponent.ClassName);
Invisible:=(RegComp<>nil) and (RegComp.PageName='');
Invisible:=(RegComp=nil) or (RegComp.PageName='');
end;
end;

View File

@ -185,25 +185,26 @@ type
destructor Destroy; override;
function DoHint(var HintStr: string): Boolean; dynamic;
function Execute: Boolean; override;
public
property AutoCheck: Boolean
read FAutoCheck write SetAutoCheck default False;
read FAutoCheck write SetAutoCheck default False;
property Caption: string read FCaption write SetCaption;
property Checked: Boolean read FChecked write SetChecked default False;
property DisableIfNoHandler: Boolean
read FDisableIfNoHandler write FDisableIfNoHandler default False;
property DisableIfNoHandler: Boolean read FDisableIfNoHandler
write FDisableIfNoHandler default False;
property Enabled: Boolean read FEnabled write SetEnabled default True;
property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;
property HelpContext: THelpContext
read FHelpContext write SetHelpContext default 0;
read FHelpContext write SetHelpContext default 0;
property HelpKeyword: string read FHelpKeyword write SetHelpKeyword;
property HelpType: THelpType
read FHelpType write SetHelpType default htContext;
read FHelpType write SetHelpType default htContext;
property Hint: string read FHint write SetHint;
property ImageIndex: TImageIndex
read FImageIndex write SetImageIndex default -1;
read FImageIndex write SetImageIndex default -1;
property ShortCut: TShortCut read FShortCut write SetShortCut default 0;
property SecondaryShortCuts: TShortCutList read GetSecondaryShortCuts
write SetSecondaryShortCuts stored IsSecondaryShortCutsStored;
write SetSecondaryShortCuts stored IsSecondaryShortCutsStored;
property Visible: Boolean read FVisible write SetVisible default True;
property OnHint: THintEvent read FOnHint write FOnHint;
end;

View File

@ -22,6 +22,7 @@ begin
FImageIndex := -1;
FVisible := True;
FSecondaryShortCuts := nil;
FHelpType := htContext;
end;
destructor TCustomAction.Destroy;