mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 22:17:24 +01:00
IDE: fixed creating methods with the right LookupRoot owner for inline components
git-svn-id: trunk@15700 -
This commit is contained in:
parent
bc8c1dea0f
commit
138ad73ec6
@ -1648,7 +1648,7 @@ begin
|
||||
Method.Data := FCurReadJITComponent;
|
||||
end else begin
|
||||
// create a fake TJITMethod
|
||||
JITMethod:=JITMethods.Add(FCurReadJITComponent.ClassType,TheMethodName);
|
||||
JITMethod:=JITMethods.Add(Reader.LookupRoot.ClassType,TheMethodName);
|
||||
Method:=JITMethod.Method;
|
||||
end;
|
||||
SetMethodProp(Instance, PropInfo, Method);
|
||||
@ -1842,7 +1842,7 @@ function TJITMethods.Add(aClass: TClass;
|
||||
begin
|
||||
Result:=Find(aClass,aMethodName);
|
||||
if Result=nil then begin
|
||||
//DebugLn(['TJITMethods.Add Create Class=',dbgsname(aClass),' aMethodName=',aMethodName]);
|
||||
DebugLn(['TJITMethods.Add Create Class=',dbgsname(aClass),' aMethodName=',aMethodName]);
|
||||
Result:=TJITMethod.Create(Self,aClass,aMethodName);
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -1413,6 +1413,8 @@ end;
|
||||
|
||||
function TMainIDE.OnPropHookGetMethodName(const Method: TMethod;
|
||||
CheckOwner: TObject): ShortString;
|
||||
var
|
||||
JITMethod: TJITMethod;
|
||||
begin
|
||||
if Method.Code<>nil then begin
|
||||
if Method.Data<>nil then begin
|
||||
@ -1426,7 +1428,11 @@ begin
|
||||
end else
|
||||
Result:='<No LookupRoot>';
|
||||
end else if IsJITMethod(Method) then begin
|
||||
Result:=TJITMethod(Method.Data).TheMethodName;
|
||||
JITMethod:=TJITMethod(Method.Data);
|
||||
Result:=JITMethod.TheMethodName;
|
||||
if GlobalDesignHook.LookupRoot.ClassType<>JITMethod.TheClass then begin
|
||||
Result:=JITMethod.TheClass.ClassName+'.'+Result;
|
||||
end;
|
||||
end else
|
||||
Result:='';
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user