Browse Source

* Patch from inoussa to publish stretch for shape

git-svn-id: trunk@41748 -
michael 6 years ago
parent
commit
409ca963ca
2 changed files with 12 additions and 2 deletions
  1. 8 2
      packages/fcl-report/src/fpreport.pp
  2. 4 0
      packages/fcl-report/src/fpreportdb.pp

+ 8 - 2
packages/fcl-report/src/fpreport.pp

@@ -2062,7 +2062,8 @@ type
     property    ShapeType;
     property    Orientation;
     property    CornerRadius;
-    property    Color;
+    property    Color; 
+    property    StretchMode;
   end;
 
 
@@ -5176,8 +5177,13 @@ begin
 end;
 
 procedure TFPReportCustomShape.RecalcLayout;
+var
+  h: TFPReportUnits;
 begin
-  // Do nothing
+  if StretchMode = smDontStretch then
+    exit;
+  h := Layout.Height;
+  ApplyStretchMode(h);
 end;
 
 procedure TFPReportCustomShape.DoWriteLocalProperties(AWriter: TFPReportStreamer; AOriginal: TFPReportElement);

+ 4 - 0
packages/fcl-report/src/fpreportdb.pp

@@ -64,7 +64,11 @@ begin
     FDataset.RemoveFreeNotification(Self);
   FDataSet:=AValue;
   if Assigned(FDataset) then
+    begin
     FDataset.FreeNotification(Self);
+//    if FDataset.Active then
+//      InitFieldDefs;
+    end;
 end;
 
 function TFPReportDatasetData.GetIsOpened: boolean;