mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 05:58:15 +02:00
LCL/ListView: Disable editing of virtual list items when multiple items are selected to avoid transferring the edited caption to the wrong node.
This commit is contained in:
parent
c0aa681113
commit
451f75e3ce
@ -333,7 +333,7 @@ begin
|
||||
DoItemChecked(Item);
|
||||
|
||||
// end editing
|
||||
if FEditor.Visible then
|
||||
if IsEditing then
|
||||
HideEditor;
|
||||
|
||||
// focus
|
||||
@ -1222,8 +1222,8 @@ end;
|
||||
|
||||
function TCustomListView.CanEdit(Item: TListItem): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
if Assigned(FOnEditing) then
|
||||
Result := not (OwnerData and MultiSelect and (SelCount > 1));
|
||||
if Result and Assigned(FOnEditing) then
|
||||
FOnEditing(Self, Item, Result);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user