mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 17:38:23 +02:00
LCL/ListView: Better fix for editing virtual multi-select listview than 451f75e3ce
. Issue #39708.
This commit is contained in:
parent
451f75e3ce
commit
b694be37b0
@ -446,7 +446,12 @@ var
|
|||||||
begin
|
begin
|
||||||
S := FEditor.Text;
|
S := FEditor.Text;
|
||||||
if FEditor.Item <> nil then
|
if FEditor.Item <> nil then
|
||||||
|
begin
|
||||||
|
if MultiSelect and OwnerData then
|
||||||
|
DoEndEdit(Items[FSelectedIdx], S)
|
||||||
|
else
|
||||||
DoEndEdit(FEditor.Item, S);
|
DoEndEdit(FEditor.Item, S);
|
||||||
|
end;
|
||||||
FEditor.Item := nil;
|
FEditor.Item := nil;
|
||||||
FEditor.Visible := False;
|
FEditor.Visible := False;
|
||||||
FEditor.SetBounds(0, 0, 0, 0);
|
FEditor.SetBounds(0, 0, 0, 0);
|
||||||
@ -1222,8 +1227,8 @@ end;
|
|||||||
|
|
||||||
function TCustomListView.CanEdit(Item: TListItem): Boolean;
|
function TCustomListView.CanEdit(Item: TListItem): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := not (OwnerData and MultiSelect and (SelCount > 1));
|
Result := True;
|
||||||
if Result and Assigned(FOnEditing) then
|
if Assigned(FOnEditing) then
|
||||||
FOnEditing(Self, Item, Result);
|
FOnEditing(Self, Item, Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user