* Fix bug #33328, reset modified flag must be done in callback, if set

git-svn-id: trunk@57452 -
This commit is contained in:
michael 2018-03-06 07:57:39 +00:00
parent 1f3b852e69
commit b84e7d6fa8
2 changed files with 8 additions and 1 deletions

View File

@ -102,6 +102,7 @@ begin
J:=report as TFPJSONReport;
J.DesignTimeJSON.Clear;
J.SavetoJSON(J.DesignTimeJSON);
(Sender as TFPReportDesignerForm).ResetModified;
end;
procedure TFPReportDesigner.ConfigDesigner(F : TFPReportDesignerForm);

View File

@ -325,6 +325,7 @@ type
function PageDesigner(Aindex : Integer) : TFPReportDesignerControl;
Property Modified : Boolean Read GetModified Write SetModified;
public
procedure ResetModified; virtual;
procedure DesignReport; virtual;
procedure StopDesigning; virtual;
procedure PreviewReport; virtual;
@ -336,7 +337,7 @@ type
Property FileName : String Read FFileName Write FFileName;
Property ReportDesignData : TDesignReportDataCollection Read FReportDesignData;
Property DesignOptions : TFPReportDesignOptions Read FDesignOptions Write SetDesignOptions;
// If these are set, they override the default handling.
// If these are set, they override the default handling. You must set the modified
Property OnSaveReport : TNotifyEvent Read FOnSaveReport Write FOnSaveReport;
Property OnNewReport : TNotifyEvent Read FOnNewReport Write FOnNewReport;
Property OnOpenReport : TNotifyEvent Read FOnOpenReport Write FOnOpenReport;
@ -741,6 +742,11 @@ begin
Result:=Nil;
end;
procedure TFPReportDesignerForm.ResetModified;
begin
Modified:=False;
end;
procedure TFPReportDesignerForm.AAddMemoExecute(Sender: TObject);
begin
CurrentDesigner.AddElement(TFPReportMemo);