mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 02:39:37 +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);
|
DoItemChecked(Item);
|
||||||
|
|
||||||
// end editing
|
// end editing
|
||||||
if FEditor.Visible then
|
if IsEditing then
|
||||||
HideEditor;
|
HideEditor;
|
||||||
|
|
||||||
// focus
|
// focus
|
||||||
@ -1222,8 +1222,8 @@ end;
|
|||||||
|
|
||||||
function TCustomListView.CanEdit(Item: TListItem): Boolean;
|
function TCustomListView.CanEdit(Item: TListItem): Boolean;
|
||||||
begin
|
begin
|
||||||
Result := True;
|
Result := not (OwnerData and MultiSelect and (SelCount > 1));
|
||||||
if Assigned(FOnEditing) then
|
if Result and Assigned(FOnEditing) then
|
||||||
FOnEditing(Self, Item, Result);
|
FOnEditing(Self, Item, Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user