This repository was archived by the owner on Apr 4, 2025. It is now read-only.
File tree 1 file changed +8
-5
lines changed
edu.rice.cs.hpctree/src/edu/rice/cs/hpctree
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -533,19 +533,22 @@ public void refresh() {
533
533
// and the new reset list:
534
534
// [0, 1, 2, 3, 4, 5]
535
535
// so the new position should be:
536
+ // [0, 1, 4, 2, 3, 5]
536
537
// [0, 1, 4, 2, 5, 3]
537
538
//
538
539
// Since the tree column is static (always 0 position)
539
- // then the index 3 (now its index is 4) has to move to position 2 , and
540
- // index 4 moves to position 3
540
+ // then the index 3 (now its index is 4) has to move to position 1+1 , and
541
+ // index 4 (now its index is 5) moves to position 3+1
541
542
for (int i =1 ; i <listOrder .size (); i ++) {
542
543
int order1 = listOrder .get (i );
543
- int order2 = newListOrder .get (i + diff );
544
+
545
+ final var oldPosition = order1 + diff ;
546
+ final var newPosition = newListOrder .get (i + diff );
544
547
545
- if (order2 == order1 + diff )
548
+ if (newPosition == oldPosition )
546
549
continue ;
547
550
548
- reorderLayer .reorderColumnPosition (order1 + diff , order2 );
551
+ reorderLayer .reorderColumnPosition (oldPosition , i + diff );
549
552
newListOrder = reorderLayer .getColumnIndexOrder ();
550
553
}
551
554
}
You can’t perform that action at this time.
0 commit comments