mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2026-01-03 15:00:35 +01:00
IDE: Change a CheckBox state only if user clicked the value part in OI (when using CheckBox for booleans)
git-svn-id: trunk@37833 -
This commit is contained in:
parent
d4e4a800c9
commit
67c49dcb2a
@ -451,7 +451,7 @@ type
|
||||
procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;
|
||||
procedure SetCurrentRowValue(const NewValue: string);
|
||||
procedure SetItemIndexAndFocus(NewItemIndex: integer;
|
||||
WasMouseClick: Boolean = False);
|
||||
WasValueClick: Boolean = False);
|
||||
|
||||
property BackgroundColor: TColor read FBackgroundColor
|
||||
write SetBackgroundColor default DefBackgroundColor;
|
||||
@ -1931,7 +1931,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TOICustomPropertyGrid.SetItemIndexAndFocus(NewItemIndex: integer;
|
||||
WasMouseClick: Boolean);
|
||||
WasValueClick: Boolean);
|
||||
begin
|
||||
if not InRange(NewItemIndex, 0, FRows.Count - 1) then exit;
|
||||
ItemIndex:=NewItemIndex;
|
||||
@ -1940,7 +1940,7 @@ begin
|
||||
SetActiveControl(FCurrentEdit);
|
||||
if (FCurrentEdit is TCustomEdit) then
|
||||
TCustomEdit(FCurrentEdit).SelectAll
|
||||
else if WasMouseClick and (FCurrentEdit is TCheckBox) then
|
||||
else if WasValueClick and (FCurrentEdit is TCheckBox) then
|
||||
TCheckBox(FCurrentEdit).Checked:=not TCheckBox(FCurrentEdit).Checked;
|
||||
end;
|
||||
end;
|
||||
@ -2026,8 +2026,7 @@ begin
|
||||
ExpandRow(Index);
|
||||
end;
|
||||
end;
|
||||
|
||||
SetItemIndexAndFocus(Index, True);
|
||||
SetItemIndexAndFocus(Index, SplitterX<X);
|
||||
SetCaptureControl(Self);
|
||||
Column := oipgcValue;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user