LazReport, restore old obj position after stretching objects, mainly for horizontal line object which was accumulating position after each record

git-svn-id: trunk@37467 -
This commit is contained in:
jesus 2012-05-31 06:28:05 +00:00
parent b1a2dfb791
commit 561c7eacc3

View File

@ -243,6 +243,7 @@ type
FDataSet: TfrTDataSet;
FField: String;
olddy: Integer;
oldy: Integer;
procedure ShowBackGround; virtual;
procedure ShowFrame; virtual;
@ -5022,7 +5023,7 @@ var
t: TfrView;
begin
{$IFDEF DebugLR}
DebugLnEnter('TfrBand.StretchObjects INIT MaxHeight=%d',[MaxHeight]);
DebugLnEnter('TfrBand.StretchObjects INIT MaxHeight=%d Self.dy=%d',[MaxHeight,Self.dy]);
{$ENDIF}
for i := 0 to Objects.Count - 1 do
begin
@ -5033,6 +5034,7 @@ begin
{$IFDEF DebugLR}
DebugLn('i=%d View=%s Antes: y=%d dy=%d',[i,ViewInfo(t), t.y,t.dy]);
{$ENDIF}
t.oldy := t.y;
if t.dy=0 then
t.y := t.y + (MaxHeight - self.dy)
else
@ -5056,6 +5058,7 @@ begin
begin
t :=TfrView(Objects[i]);
t.dy := t.olddy;
t.y := t.oldy;
end;
end;