IDEIntf: object inspector: fixed DoCallEdit checking for focus

git-svn-id: trunk@41867 -
This commit is contained in:
mattias 2013-06-24 12:33:34 +00:00
parent 4a4b3a8ecd
commit bbf5c1f087

View File

@ -1356,7 +1356,8 @@ var
CurRow:TOIPropertyGridRow;
OldChangeStep: integer;
begin
if not CanEditRowValue(true) then exit;
//debugln(['TOICustomPropertyGrid.DoCallEdit ',dbgs(GetFocus),' ',DbgSName(FindControl(GetFocus))]);
if not CanEditRowValue(false) then exit;
OldChangeStep:=fChangeStep;
CurRow:=Rows[FItemIndex];
@ -1957,7 +1958,8 @@ begin
or (FPropertyEditorHook.LookupRoot = FCurrentEditorLookupRoot));
if Result and CheckFocus then begin
FocusedControl:=FindControl(GetFocus);
if (FocusedControl<>nil) and not IsParentOf(FocusedControl) then
if (FocusedControl<>nil) and (FocusedControl<>Self)
and (not IsParentOf(FocusedControl)) then
Result:=false;
end;
if Result then begin