profile viewer, add context menu allowing to copy markdown table

This commit is contained in:
Basile Burg 2018-03-03 09:10:02 +01:00
parent 9281c90c28
commit 7fcd05ed30
2 changed files with 7 additions and 3 deletions

View File

@ -830,12 +830,15 @@ var
s: string = '';
c: integer;
i: integer;
f: integer = 0;
begin
while fList.Column[f].Caption = '' do
f += 1;
c := fList.Items.Count - 1;
for i:= 0 to fList.ColumnCount-1 do
for i:= f to fList.ColumnCount-1 do
s += '| ' + fList.Column[i].Caption;
s += LineEnding;
for i:= 0 to fList.ColumnCount-1 do
for i:= f to fList.ColumnCount-1 do
s += '| ---';
s += LineEnding;
for i := 0 to c do

View File

@ -9,7 +9,7 @@ uses
TATools, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, ComCtrls,
StdCtrls, TALegend, math,
ce_widget, ce_common, ce_stringrange, ce_dsgncontrols, ce_ddemangle,
ce_interfaces, ce_observer, ce_writableComponent;
ce_interfaces, ce_observer, ce_writableComponent, ce_controls;
type
@ -197,6 +197,7 @@ begin
updatePie;
list.OnCompare:=@listCompare;
selPieSourceSelect(nil);
list.PopupMenu := TCEListViewCopyMenu.create(list);
end;
destructor TCEProfileViewerWidget.destroy;