diff --git a/src/u_controls.pas b/src/u_controls.pas index 2c64eae6..c20f8844 100644 --- a/src/u_controls.pas +++ b/src/u_controls.pas @@ -148,7 +148,9 @@ type procedure copyAllAsList(sender: TObject); procedure copyAllAsMarkdown(sender: TObject); public + class function fixedItemCount(): integer; static; constructor create(aOwner: TComponent); override; + procedure addAdditionalItem(item: TMenuItem); end; implementation @@ -851,5 +853,17 @@ begin clipboard.AsText := s; end; +class function TListViewCopyMenu.fixedItemCount(): integer; +begin + result := 7; +end; + +procedure TListViewCopyMenu.addAdditionalItem(item: TMenuItem); +begin + if Items.Count = fixedItemCount then + Items.AddSeparator; + items.Add(item); +end; + end.