mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 23:32:48 +02:00
LCL: TListViewItems: do not call ws ItemExchange() or ItemMove() if OwnerData = True.
git-svn-id: trunk@31368 -
This commit is contained in:
parent
a0933e1606
commit
fe54d8652c
@ -154,12 +154,11 @@ begin
|
||||
raise Exception.CreateFmt(rsListIndexExceedsBounds, [AIndex1]);
|
||||
if (AIndex2 < 0) or (AIndex2 >= FItems.Count) then
|
||||
raise Exception.CreateFmt(rsListIndexExceedsBounds, [AIndex2]);
|
||||
|
||||
AItem := Item[AIndex1];
|
||||
FItems.Exchange(AIndex1, AIndex2);
|
||||
FCacheIndex := AIndex1;
|
||||
FCacheItem := AItem;
|
||||
if WSUpdateAllowed then
|
||||
if not Owner.OwnerData and WSUpdateAllowed then
|
||||
begin
|
||||
TWSCustomListViewClass(FOwner.WidgetSetClass).ItemExchange(FOwner, AItem,
|
||||
AIndex1, AIndex2);
|
||||
@ -180,7 +179,7 @@ begin
|
||||
FItems.Move(AFromIndex, AToIndex);
|
||||
FCacheIndex := AToIndex;
|
||||
FCacheItem := AItem;
|
||||
if WSUpdateAllowed then
|
||||
if not Owner.OwnerData and WSUpdateAllowed then
|
||||
begin
|
||||
TWSCustomListViewClass(FOwner.WidgetSetClass).ItemMove(FOwner, AItem,
|
||||
AFromIndex, AToIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user