浏览代码

* DisplayName should not set name

git-svn-id: trunk@25619 -
michael 11 年之前
父节点
当前提交
1f0c70508f
共有 1 个文件被更改,包括 8 次插入4 次删除
  1. 8 4
      packages/fcl-web/src/base/fphttp.pp

+ 8 - 4
packages/fcl-web/src/base/fphttp.pp

@@ -435,16 +435,20 @@ end;
 
 
 function TCustomWebAction.GetDisplayName: String;
 function TCustomWebAction.GetDisplayName: String;
 begin
 begin
-  If (FName='') then
-    FName:=ClassName+IntToStr(self.Index);
   Result:=FName;
   Result:=FName;
+  If (Result='') then
+    begin
+    Result:=ClassName+IntToStr(self.Index);
+    if Result[1]='T' then
+      Delete(Result,1,1)
+    end;
 end;
 end;
 
 
 Function TCustomWebAction.GetNamePath : String;
 Function TCustomWebAction.GetNamePath : String;
 begin
 begin
- If (FName='') then
-    FName:=ClassName+IntToStr(self.Index);
   Result:=FName;
   Result:=FName;
+  If (Result='') then
+    FName:=ClassName+IntToStr(self.Index);
 end;
 end;
 
 
 procedure TCustomWebAction.SetDisplayName(const AValue: String);
 procedure TCustomWebAction.SetDisplayName(const AValue: String);