* Fix bug #33271 ( status BAR modified changes not propagated correctly )

git-svn-id: trunk@57415 -
This commit is contained in:
michael 2018-02-28 10:37:54 +00:00
parent 40e3d82715
commit e5a953cb59
4 changed files with 17 additions and 6 deletions

View File

@ -1181,7 +1181,7 @@ begin
E.Element:=O.Element;
if E.Execute then
begin
Objects.Modified:=True;
Objects.ReportChanged;
Invalidate;
end;
finally

View File

@ -98,10 +98,10 @@ Type
function GetSelectionArray(SelSort: TSelectionSort): TReportObjectArray;
procedure SelectRectInvalid;
Procedure SelectionChanged; virtual;
Procedure ReportChanged; virtual;
Public
// Do things
Procedure LoadFromPage(APage : TFPReportCustomPage); virtual;
Procedure ReportChanged; virtual;
Procedure BeginSelectionUpdate;
Procedure EndSelectionUpdate;
Procedure ClearSelection;
@ -140,7 +140,7 @@ Type
Property CanvasExport : TFPReportExportCanvas Read FCanvasExport Write FCanvasExport;
Property OnSelectionChange : TNotifyEvent Read FOnSelectionChange Write FOnSelectionChange;
Property OnReportChange : TNotifyEvent Read FOnReportChange Write FOnReportChange;
Property Modified : Boolean Read FModified Write SetModified;
Property Modified : Boolean Read FModified;
Property Objects[Aindex : Integer] : TReportObject Read GetObject; default;
Property Elements[AIndex : Integer] : TFPReportElement Read GetElement;
Property Page : TFPReportCustomPage Read FPage;
@ -305,7 +305,7 @@ end;
procedure TReportObjectList.ReportChanged;
begin
FModified:=True;
SetModified(True);
end;
procedure TReportObjectList.BeginSelectionUpdate;

View File

@ -301,7 +301,6 @@ object FPReportDesignerForm: TFPReportDesignerForm
Width = 890
Panels = <
item
Text = 'Modified'
Width = 80
end
item

View File

@ -299,6 +299,7 @@ type
procedure SetDesignOptions(AValue: TFPReportDesignOptions);
procedure SetFileCaption(const AFileName: String);
procedure SetModified(AValue: Boolean);
procedure SetModifiedStatus;
Protected
procedure MRUMenuManager1RecentFile(Sender: TObject; const AFileName: String);
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
@ -368,6 +369,7 @@ ResourceString
SOpenReport = 'open other report';
SCloseDesigner = 'close designer';
SNoSelection = 'No selection';
SStatusModified = 'Modified';
SErrAccessingData = 'Error accessing data for report';
SErrAccessingDataDetails = 'One or more report data sources failed to open:'+
sLineBreak+'%s'+sLineBreak+
@ -660,8 +662,18 @@ begin
FModified:=AVAlue;
if not Avalue then
For I:=0 to DesignerCount-1 do
PageDesigner(i).Objects.Modified:=False;
PageDesigner(i).Objects.ResetModified;
SetModifiedStatus;
end;
procedure TFPReportDesignerForm.SetModifiedStatus;
begin
SetFileCaption(FileName);
if GetModified then
SBReport.Panels[0].Text:=SStatusModified
else
SBReport.Panels[0].Text:='';
end;
procedure TFPReportDesignerForm.MRUMenuManager1RecentFile(Sender: TObject;