mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-27 22:01:43 +01:00
ValEdit: KeyDeleten does not require KeyEdit.
git-svn-id: trunk@40459 -
This commit is contained in:
parent
36c87da38d
commit
64aaa76ce9
@ -837,12 +837,8 @@ end;
|
|||||||
|
|
||||||
procedure TValueListEditor.SetKeyOptions({const} AValue: TKeyOptions);
|
procedure TValueListEditor.SetKeyOptions({const} AValue: TKeyOptions);
|
||||||
begin
|
begin
|
||||||
// ToDo: Disable Add or enable Edit based on current value.
|
// KeyAdd requires KeyEdit, KeyAdd oddly enough does not according to Delphi specs
|
||||||
// Enable Edit when Adding, disable Add when Editing.
|
|
||||||
// Change Col if needed when editing keys is disabled.
|
|
||||||
// KeyAdd and KeyDelete (not quite sure about the latter) require KeyEdit
|
|
||||||
if (KeyAdd in AValue) and not (KeyEdit in AValue) then AValue := AValue - [KeyAdd];
|
if (KeyAdd in AValue) and not (KeyEdit in AValue) then AValue := AValue - [KeyAdd];
|
||||||
if (KeyDelete in AValue) and not (KeyEdit in AValue) then AValue := AValue - [KeyDelete];
|
|
||||||
FKeyOptions := AValue;
|
FKeyOptions := AValue;
|
||||||
if (KeyAdd in FKeyOptions) then
|
if (KeyAdd in FKeyOptions) then
|
||||||
Options := Options + [goAutoAddRows]
|
Options := Options + [goAutoAddRows]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user