From fe54d8652cc5b61705c34bb5f95c649c19884471 Mon Sep 17 00:00:00 2001 From: zeljko Date: Fri, 24 Jun 2011 21:04:30 +0000 Subject: [PATCH] LCL: TListViewItems: do not call ws ItemExchange() or ItemMove() if OwnerData = True. git-svn-id: trunk@31368 - --- lcl/include/listitems.inc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lcl/include/listitems.inc b/lcl/include/listitems.inc index 9a79278f9b..14a02d793a 100644 --- a/lcl/include/listitems.inc +++ b/lcl/include/listitems.inc @@ -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);