* 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:
michael 2018-03-09 08:07:40 +00:00
parent 1a0ae2d1eb
commit 1244ee0521

View File

@ -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;