Revert r1092 and apply an alternate solution. Wants nothing more than to be tested badly.

This commit is contained in:
rosenfield
2007-11-09 15:02:07 +00:00
parent 0cc2bd5f7f
commit 55acd1c45a

View File

@ -1028,17 +1028,11 @@ end;
function TSMDBGrid.AcquireFocus: Boolean; function TSMDBGrid.AcquireFocus: Boolean;
begin begin
Result := True; Result := True;
if FAcquireFocus and not (csDesigning in ComponentState) then if FAcquireFocus and CanFocus and not (csDesigning in ComponentState) then
begin begin
if (InplaceEditor <> nil) then begin Windows.SetFocus(Self.Handle);
if InplaceEditor.CanFocus then begin SetFocus;
InplaceEditor.SetFocus; Result := Focused or (InplaceEditor <> nil) and InplaceEditor.Focused;
Result := InplaceEditor.Focused;
end;
end else if CanFocus then begin
SetFocus;
Result := Focused;
end;
end; end;
end; end;
@ -1459,7 +1453,7 @@ var
EnableClick: Boolean; EnableClick: Boolean;
PopCoord: TPoint; PopCoord: TPoint;
begin begin
if not AcquireFocus then Exit; if not AcquireFocus then exit;
if (ssDouble in Shift) and (Button = mbLeft) then if (ssDouble in Shift) and (Button = mbLeft) then
begin begin
DblClick; DblClick;