IDEIntf: OI: forbid showing sub properties of a TPersistent property if value is selected component, bug #11355

git-svn-id: trunk@15908 -
This commit is contained in:
mattias 2008-07-29 09:05:04 +00:00
parent 12f1a8ff3d
commit d1c8d571f1

View File

@ -1734,7 +1734,7 @@ end;
function TOICustomPropertyGrid.CanExpandRow(Row: TOIPropertyGridRow): boolean; function TOICustomPropertyGrid.CanExpandRow(Row: TOIPropertyGridRow): boolean;
var var
AnObject: TObject; AnObject: TPersistent;
ParentRow: TOIPropertyGridRow; ParentRow: TOIPropertyGridRow;
begin begin
Result:=false; Result:=false;
@ -1742,7 +1742,8 @@ begin
if (not (paSubProperties in Row.Editor.GetAttributes)) then exit; if (not (paSubProperties in Row.Editor.GetAttributes)) then exit;
// check if circling // check if circling
if (Row.Editor is TPersistentPropertyEditor) then begin if (Row.Editor is TPersistentPropertyEditor) then begin
AnObject:=Row.Editor.GetObjectValue; AnObject:=TPersistent(Row.Editor.GetObjectValue);
if FSelection.IndexOf(AnObject)>=0 then exit;
ParentRow:=Row.Parent; ParentRow:=Row.Parent;
while ParentRow<>nil do begin while ParentRow<>nil do begin
if (ParentRow.Editor is TPersistentPropertyEditor) if (ParentRow.Editor is TPersistentPropertyEditor)