TAChart: Fix List-out-of-bounds when moving the series up in the editor

git-svn-id: trunk@32454 -
This commit is contained in:
ask 2011-09-21 22:32:34 +00:00
parent 837fe09471
commit 2118b39908

View File

@ -275,7 +275,7 @@ begin
if not ChildrenListBox.SelCount = 0 then exit;
i := AStart - ADir;
with ChildrenListBox do
while InRange(i + ADir, 0, Count - 1) do begin
while InRange(i, 0, Count - 1) and InRange(i + ADir, 0, Count - 1) do begin
if Selected[i] and not Selected[i + ADir] then begin
with TIndexedComponent(Items.Objects[i]) do
Index := Index + ADir;