Browse Source

Merged revisions 10889-10890 via svnmerge from
svn+ssh://svn.freepascal.org/FPC/svn/fpc/trunk

........
r10889 | michael | 2008-05-05 21:33:17 +0200 (Mon, 05 May 2008) | 1 line

* GOTO ON in source.
........
r10890 | michael | 2008-05-05 21:34:06 +0200 (Mon, 05 May 2008) | 1 line

* Patch from Paul Ishenin to implement SetDesigning and SetDesignInstance
........

git-svn-id: branches/fixes_2_2@10891 -

michael 17 years ago
parent
commit
a71c02ccca
2 changed files with 23 additions and 4 deletions
  1. 22 4
      rtl/objpas/classes/compon.inc
  2. 1 0
      rtl/objpas/math.pp

+ 22 - 4
rtl/objpas/classes/compon.inc

@@ -288,20 +288,38 @@ begin
 end;
 
 
-Procedure TComponent.SetDesigning(Value: Boolean);
+Procedure TComponent.SetDesigning(Value: Boolean; SetChildren : Boolean = True);
 
 Var Runner : Longint;
 
 begin
   If Value then
-    Include(FComponentSTate,csDesigning)
+    Include(FComponentState,csDesigning)
   else
-    Exclude(FComponentSTate,csDesigning);
-  if Assigned(FComponents) then
+    Exclude(FComponentState,csDesigning);
+  if Assigned(FComponents) and SetChildren then
     For Runner:=0 To FComponents.Count - 1 do
       TComponent(FComponents.items[Runner]).SetDesigning(Value);
 end;
 
+Procedure TComponent.SetDesignInstance(Value: Boolean);
+
+begin
+  If Value then
+    Include(FComponentState,csDesignInstance)
+  else
+    Exclude(FComponentState,csDesignInstance);
+end;
+
+Procedure TComponent.SetInline(Value: Boolean);
+
+begin
+  If Value then
+    Include(FComponentState,csInline)
+  else
+    Exclude(FComponentState,csInline);
+end;
+
 
 Procedure TComponent.SetName(const NewName: TComponentName);
 

+ 1 - 0
rtl/objpas/math.pp

@@ -23,6 +23,7 @@
 
 {$MODE objfpc}
 {$inline on }
+{$GOTO on}
 unit math;
 interface