Open GoogleCodeExporter opened 9 years ago
Sorry, that should have read "is logically *in this situation*"
A situation it doesn't work in is:
- Start with 012345678
- Select 12467 and drag to before 3
- Move 1 should give 021345678 => before 3
- Move 2 should give 012345678 => before 3
- Move 4 should give 012435678 => before 3
- Move 6 should give 012463578 => before 4
- Move 7 should give 012467358 => before 5
So the code needs to check the index of the widget it is moving first. If it is
after the dropIndex then we need to increment the dropIndex after the insert.
So something a bit like:
int oldIndex = dropTarget.getWidgetIndex(widget);
dropTarget.insert(widget, dropIndex);
if (oldIndex > dropIndex) {
dropIndex++;
}
I'll check that actually works soon. This may also solve issue 124 (not sure).
Original comment by cknow...@gmail.com
on 24 Sep 2010 at 8:55
Original issue reported on code.google.com by
cknow...@gmail.com
on 24 Sep 2010 at 8:14