mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 04:16:06 +02:00
invisible selected persistents are no longer drawn with grabbers
git-svn-id: trunk@5730 -
This commit is contained in:
parent
5d5266b9f3
commit
7bf089b375
@ -113,6 +113,7 @@ type
|
|||||||
FIsTComponent: boolean;
|
FIsTComponent: boolean;
|
||||||
FIsTControl: boolean;
|
FIsTControl: boolean;
|
||||||
FIsTWinControl: boolean;
|
FIsTWinControl: boolean;
|
||||||
|
FIsVisible: boolean;
|
||||||
FMarkerPaintedBounds: TRect;
|
FMarkerPaintedBounds: TRect;
|
||||||
FOldFormRelativeLeftTop: TPoint;
|
FOldFormRelativeLeftTop: TPoint;
|
||||||
FOldHeight: integer;
|
FOldHeight: integer;
|
||||||
@ -159,6 +160,7 @@ type
|
|||||||
read FOldFormRelativeLeftTop write FOldFormRelativeLeftTop;
|
read FOldFormRelativeLeftTop write FOldFormRelativeLeftTop;
|
||||||
property Flags: TSelectedControlFlags read FFlags write FFlags;
|
property Flags: TSelectedControlFlags read FFlags write FFlags;
|
||||||
property UseCache: boolean read FUseCache write SetUseCache;
|
property UseCache: boolean read FUseCache write SetUseCache;
|
||||||
|
property IsVisible: boolean read FIsVisible;
|
||||||
property IsTComponent: boolean read FIsTComponent;
|
property IsTComponent: boolean read FIsTComponent;
|
||||||
property IsTControl: boolean read FIsTControl;
|
property IsTControl: boolean read FIsTControl;
|
||||||
property IsTWinControl: boolean read FIsTWinControl;
|
property IsTWinControl: boolean read FIsTWinControl;
|
||||||
@ -548,6 +550,8 @@ begin
|
|||||||
FIsNonVisualComponent:=FIsTComponent and (not FIsTControl);
|
FIsNonVisualComponent:=FIsTComponent and (not FIsTControl);
|
||||||
if FIsTComponent then
|
if FIsTComponent then
|
||||||
FDesignerForm:=GetDesignerForm(TComponent(FPersistent));
|
FDesignerForm:=GetDesignerForm(TComponent(FPersistent));
|
||||||
|
FIsVisible:=FIsTComponent
|
||||||
|
and (not ComponentIsInvisible(TComponent(APersistent)));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TSelectedControl.Destroy;
|
destructor TSelectedControl.Destroy;
|
||||||
@ -2056,7 +2060,8 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
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;
|
Diff:=DC.FormOrigin;
|
||||||
|
|
||||||
@ -2117,7 +2122,7 @@ begin
|
|||||||
if not Items[i].IsTComponent then continue;
|
if not Items[i].IsTComponent then continue;
|
||||||
AComponent:=TComponent(Items[i].Persistent);
|
AComponent:=TComponent(Items[i].Persistent);
|
||||||
if (AComponent=FLookupRoot)
|
if (AComponent=FLookupRoot)
|
||||||
or ComponentIsInvisible(AComponent) then continue;
|
or (not Items[i].IsVisible) then continue;
|
||||||
DoDrawMarker(i,DC);
|
DoDrawMarker(i,DC);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2171,8 +2176,7 @@ begin
|
|||||||
or (AComponent=FLookupRoot) then exit;
|
or (AComponent=FLookupRoot) then exit;
|
||||||
i:=IndexOf(AComponent);
|
i:=IndexOf(AComponent);
|
||||||
if i<0 then exit;
|
if i<0 then exit;
|
||||||
if ComponentIsInvisible(AComponent) then exit;
|
|
||||||
|
|
||||||
DoDrawMarker(i,DC);
|
DoDrawMarker(i,DC);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2404,8 +2408,7 @@ begin
|
|||||||
if cssOnlyInvisibleNeedsUpdate in FStates then begin
|
if cssOnlyInvisibleNeedsUpdate in FStates then begin
|
||||||
Result:=true;
|
Result:=true;
|
||||||
for i:=0 to FControls.Count-1 do begin
|
for i:=0 to FControls.Count-1 do begin
|
||||||
if (not Items[i].IsTComponent)
|
if Items[i].IsVisible then begin
|
||||||
or (not ComponentIsInvisible(TComponent(Items[i].Persistent))) then begin
|
|
||||||
Result:=false;
|
Result:=false;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
@ -284,7 +284,7 @@ begin
|
|||||||
Invisible:=(csNoDesignVisible in AControl.ControlStyle)
|
Invisible:=(csNoDesignVisible in AControl.ControlStyle)
|
||||||
end else begin
|
end else begin
|
||||||
RegComp:=FindComponent(AComponent.ClassName);
|
RegComp:=FindComponent(AComponent.ClassName);
|
||||||
Invisible:=(RegComp<>nil) and (RegComp.PageName='');
|
Invisible:=(RegComp=nil) or (RegComp.PageName='');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -185,25 +185,26 @@ type
|
|||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
function DoHint(var HintStr: string): Boolean; dynamic;
|
function DoHint(var HintStr: string): Boolean; dynamic;
|
||||||
function Execute: Boolean; override;
|
function Execute: Boolean; override;
|
||||||
|
public
|
||||||
property AutoCheck: Boolean
|
property AutoCheck: Boolean
|
||||||
read FAutoCheck write SetAutoCheck default False;
|
read FAutoCheck write SetAutoCheck default False;
|
||||||
property Caption: string read FCaption write SetCaption;
|
property Caption: string read FCaption write SetCaption;
|
||||||
property Checked: Boolean read FChecked write SetChecked default False;
|
property Checked: Boolean read FChecked write SetChecked default False;
|
||||||
property DisableIfNoHandler: Boolean
|
property DisableIfNoHandler: Boolean read FDisableIfNoHandler
|
||||||
read FDisableIfNoHandler write FDisableIfNoHandler default False;
|
write FDisableIfNoHandler default False;
|
||||||
property Enabled: Boolean read FEnabled write SetEnabled default True;
|
property Enabled: Boolean read FEnabled write SetEnabled default True;
|
||||||
property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;
|
property GroupIndex: Integer read FGroupIndex write SetGroupIndex default 0;
|
||||||
property HelpContext: THelpContext
|
property HelpContext: THelpContext
|
||||||
read FHelpContext write SetHelpContext default 0;
|
read FHelpContext write SetHelpContext default 0;
|
||||||
property HelpKeyword: string read FHelpKeyword write SetHelpKeyword;
|
property HelpKeyword: string read FHelpKeyword write SetHelpKeyword;
|
||||||
property HelpType: THelpType
|
property HelpType: THelpType
|
||||||
read FHelpType write SetHelpType default htContext;
|
read FHelpType write SetHelpType default htContext;
|
||||||
property Hint: string read FHint write SetHint;
|
property Hint: string read FHint write SetHint;
|
||||||
property ImageIndex: TImageIndex
|
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 ShortCut: TShortCut read FShortCut write SetShortCut default 0;
|
||||||
property SecondaryShortCuts: TShortCutList read GetSecondaryShortCuts
|
property SecondaryShortCuts: TShortCutList read GetSecondaryShortCuts
|
||||||
write SetSecondaryShortCuts stored IsSecondaryShortCutsStored;
|
write SetSecondaryShortCuts stored IsSecondaryShortCutsStored;
|
||||||
property Visible: Boolean read FVisible write SetVisible default True;
|
property Visible: Boolean read FVisible write SetVisible default True;
|
||||||
property OnHint: THintEvent read FOnHint write FOnHint;
|
property OnHint: THintEvent read FOnHint write FOnHint;
|
||||||
end;
|
end;
|
||||||
|
@ -22,6 +22,7 @@ begin
|
|||||||
FImageIndex := -1;
|
FImageIndex := -1;
|
||||||
FVisible := True;
|
FVisible := True;
|
||||||
FSecondaryShortCuts := nil;
|
FSecondaryShortCuts := nil;
|
||||||
|
FHelpType := htContext;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TCustomAction.Destroy;
|
destructor TCustomAction.Destroy;
|
||||||
|
Loading…
Reference in New Issue
Block a user