git-svn-id: trunk@57561 -
This commit is contained in:
michael 2018-03-25 17:32:17 +00:00
parent 92e3aa746b
commit cac42cb9d7
2 changed files with 22 additions and 9 deletions

View File

@ -123,6 +123,7 @@ Type
Procedure AdjustSelectedBandsToContent;
Procedure ResetModified;
Procedure SelectElement(E : TFPReportElement);
Function GetSelection : TReportObjectArray;
// Will call selectionchanged, except when result=odrPage
Function DeleteSelection : TObjectDeleteResult;
// Various ways to get information
@ -703,6 +704,11 @@ begin
end;
end;
function TReportObjectList.GetSelection: TReportObjectArray;
begin
Result:=GetSelectionArray(ssNone);
end;
function TReportObjectList.DeleteElement(O: TReportObject): TObjectDeleteResult;
Var

View File

@ -974,19 +974,26 @@ begin
end;
procedure TFPReportDesignerForm.DoSelectionModifiedByOI(Sender: TObject);
Var
Sel : TReportObjectArray;
begin
if Assigned(CurrentDesigner) then
begin
if (FOI.ObjectList.Count=1) and
(FOI.ObjectList.Elements[0]=CurrentDesigner.Page) then
if (FOI.ObjectList.SelectionCount=1) then
begin
CurrentDesigner.UpdatePageParams;
CurrentDesigner.Reset;
CurrentDesigner.Objects.SelectElement(CurrentDesigner.Page);
SetPageCaption(PCReport.ActivePage);
end
else
CurrentDesigner.Invalidate;
Sel:=FOI.ObjectList.GetSelection;
if (Sel[0].IsPage) and (Sel[0].AsPage=CurrentDesigner.Page) then
begin
CurrentDesigner.UpdatePageParams;
CurrentDesigner.Reset;
CurrentDesigner.Objects.SelectElement(CurrentDesigner.Page);
SetPageCaption(PCReport.ActivePage);
end
else
CurrentDesigner.Invalidate;
end;
end;
Modified:=True;
end;