IDE: FindDeclarationOfOIProperty: check for TNestedPropertyEditor

git-svn-id: trunk@26584 -
This commit is contained in:
mattias 2010-07-10 19:41:36 +00:00
parent b0336c670d
commit 8531e6e0cf

View File

@ -25,8 +25,8 @@ interface
uses uses
Classes, SysUtils, LCLProc, Forms, Controls, Buttons, StdCtrls, TypInfo, Classes, SysUtils, LCLProc, Forms, Controls, Buttons, StdCtrls, TypInfo,
ExtCtrls, Dialogs, Menus, ComCtrls, Grids, CustomTimer, ExtCtrls, Dialogs, Menus, ComCtrls, Grids, CustomTimer,
DirectoryCacher, CodeToolManager, CodeCache, DirectoryCacher, CodeToolManager, CodeCache, PropEdits,
LazIDEIntf, ProjectIntf, ObjectInspector, OIFavouriteProperties, PropEdits, LazIDEIntf, ProjectIntf, ObjectInspector, OIFavouriteProperties,
DialogProcs, FileUtil, LazConf, BaseIDEIntf, LazConfigStorage, DialogProcs, FileUtil, LazConf, BaseIDEIntf, LazConfigStorage,
LazarusIDEStrConsts; LazarusIDEStrConsts;
@ -293,11 +293,17 @@ begin
end; end;
// find the property declaration // find the property declaration
PropPath:=APersistent.ClassName+'.'+Row.Name; PropPath:=APersistent.ClassName+'.'+Row.Name;
if Row.Editor is TNestedPropertyEditor then begin
if Row.Parent=nil then begin
debugln(['FindDeclarationOfOIProperty missing parent row ',PropPath,' in unit ',Code.Filename,' Row.Editor=',DbgSName(Row.Editor)]);
exit;
end;
PropPath:=APersistent.ClassName+'.'+Row.Parent.Name+'.'+Row.Name;
end;
if not CodeToolBoss.FindDeclarationOfPropertyPath(Code,PropPath,NewCode, if not CodeToolBoss.FindDeclarationOfPropertyPath(Code,PropPath,NewCode,
NewX,NewY,NewTopLine) then NewX,NewY,NewTopLine) then
begin begin
debugln(['FindDeclarationOfOIProperty failed to find property ',PropPath,' in unit ',Code.Filename]); debugln(['FindDeclarationOfOIProperty failed to find property ',PropPath,' in unit ',Code.Filename]);
LazarusIDE.DoJumpToCodeToolBossError;
exit; exit;
end; end;
Code:=NewCode; Code:=NewCode;