mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 04:39:36 +02:00
parent
92e3aa746b
commit
cac42cb9d7
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user