[Lazarus] Can someone with commit privileges submit this fix?
John Stoneham
captnjameskirk at gmail.com
Thu Feb 24 06:25:08 CET 2011
I submitted a bug report about a week ago and have now found a solution,
which I have included in a comment in the bug report:
http://bugs.freepascal.org/view.php?id=18755
The bug makes the Object Inspector under Carbon almost useless, since
property values change unintentionally when clicked. What happened was that
someone wanted the object inspector to respond to double-clicks when it
wasn't in focus (e.g. to increment a property by double-clicking on it even
when the focus was in the editor), so code was added to force a double-click
in that situation, I believe around rev. 26493. But this broke Carbon, since
the double-clicks were handled just fine before that code was added. So
Carbon ends up getting double-clicks when just a single click is done.
What I propose in the bug report linked above is to simply conditionally
compile those two lines in objectinspector.pp, so that the affected
procedure would look like this:
procedure TOICustomPropertyGrid.ValueComboBoxMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if (Button=mbLeft) then begin
if (Shift=[ssCtrl,ssLeft]) then
DoCallEdit(oiqeShowValue)
{$IFNDEF LCLCarbon}
else if (FFirstClickTime<>0) and (Now-FFirstClickTime<(1/86400*0.4))
then
ValueEditDblClick(Sender);
{$ENDIF}
end;
end;
It still doesn't feel good to me, because it's really just a hack around
another hack. But at least the Object Inspector now works under Carbon.
--
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110223/8cefc7b5/attachment-0002.html>
More information about the Lazarus
mailing list