mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-15 02:37:10 +02:00
* Add Load/save to component editor menu (design may not be loaded prior to saving, load first)
git-svn-id: trunk@57479 -
This commit is contained in:
parent
1a0ae2d1eb
commit
1244ee0521
@ -338,6 +338,9 @@ end;
|
||||
|
||||
procedure TFPReportComponentEditor.SaveReport;
|
||||
|
||||
Var
|
||||
J : TFPJSONReport;
|
||||
|
||||
begin
|
||||
With TSaveDialog.Create(Application) do
|
||||
try
|
||||
@ -345,7 +348,12 @@ begin
|
||||
Options:=[ofPathMustExist];
|
||||
If Execute then
|
||||
If Component is TFPJSONReport then
|
||||
begin
|
||||
J:=Component as TFPJSONReport;
|
||||
if J.PageCount=0 then
|
||||
J.LoadFromJSON(J.DesignTimeJSON);
|
||||
TFPJSONReport(Component).SaveToFile(FileName);
|
||||
end;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user