mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 11:36:02 +02:00
IDEIntf: OI: show delete only for components
git-svn-id: trunk@39099 -
This commit is contained in:
parent
367c370cb7
commit
29f2e1409d
@ -5140,6 +5140,8 @@ var
|
|||||||
CurGrid: TOICustomPropertyGrid;
|
CurGrid: TOICustomPropertyGrid;
|
||||||
CurRow: TOIPropertyGridRow;
|
CurRow: TOIPropertyGridRow;
|
||||||
Persistent: TPersistent;
|
Persistent: TPersistent;
|
||||||
|
AtLeastOneComponent: Boolean;
|
||||||
|
CanBeDeleted: Boolean;
|
||||||
begin
|
begin
|
||||||
RemoveComponentEditorMenuItems;
|
RemoveComponentEditorMenuItems;
|
||||||
ShowHintsPopupMenuItem.Checked := PropertyGrid.ShowHint;
|
ShowHintsPopupMenuItem.Checked := PropertyGrid.ShowHint;
|
||||||
@ -5166,11 +5168,13 @@ begin
|
|||||||
if (Selection.Count = 1) and (Selection[0] is TControl) then
|
if (Selection.Count = 1) and (Selection[0] is TControl) then
|
||||||
AddZOrderMenuItems;
|
AddZOrderMenuItems;
|
||||||
|
|
||||||
CutPopupMenuItem.Visible := (Selection.Count > 0) and (Selection[0] is TComponent);
|
AtLeastOneComponent:=(Selection.Count > 0) and (Selection[0] is TComponent);
|
||||||
CopyPopupMenuItem.Visible := (Selection.Count > 0) and (Selection[0] is TComponent);
|
CanBeDeleted:=AtLeastOneComponent;
|
||||||
PastePopupMenuItem.Visible := (Selection.Count > 0) and (Selection[0] is TComponent);
|
CutPopupMenuItem.Visible := CanBeDeleted;
|
||||||
DeletePopupMenuItem.Visible := True;
|
CopyPopupMenuItem.Visible := AtLeastOneComponent;
|
||||||
OptionsSeparatorMenuItem2.Visible := True;
|
PastePopupMenuItem.Visible := AtLeastOneComponent;
|
||||||
|
DeletePopupMenuItem.Visible := CanBeDeleted;
|
||||||
|
OptionsSeparatorMenuItem2.Visible := AtLeastOneComponent;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user