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