|
As for your number 2 above: I have fixed this in master. The problem was not actually the code that did the move, it was the code that reselects the original set of now moved items since that selection is lost during any move. This is easy when there is just one item being selected at a time, but has turned out to be a major pain in the ass as reselections were not properly merged in to grow contiguous regions meaning the next time you tried to do a move down, the selection appeared correct but was not a contigous range and instead a selection of individual items and then movement order and direction really matters.
You can see this with your test build by doing a single contiguous move down, then manually reselecting the same (now moved) items with a click and a shift click. Then hit down arrow again. This time it works! But only because you properly reselected it after the first move. Obviously that would not work long term but it strongly hinted at the real problem.
So I had to figure out why or how merging a selection from its individual items (which appeared to highlight the correct rows) but was actually a mess underneath, could actually be done properly. It turned out I had to completely regroup things into contiguous ranges and manually select each range.
Either way this should now work correctly.
As to your number 1: we must disagree here. I do not think of the items I selected as being a rigid solid block that you must abort moving when any of it can not move (even one small piece of it) as you seem to do. I view them as a collection and of those in the collection that have a legal move, go ahead and move them. And for those that hit a boundary, and can not move, drop them from the collection but still perform the move.
This seems to be quite safe as a user can use the toc editor to fix whatever mess they made by "spamming" ie. trying to force one part of an illegal selection to move in a direction it can not (thus why I call the selection illegal for that move, it includes something selected that can not move in the direction told to.
I frankly like what it does and expected it. You obviously thought otherwise. Not sure if one of us is right and one of us is wrong, just different expectations.
I am going to leave the current code (with the fix for number 2 just pushed to master) around for a while so that others can comment if they like that behaviour or if they prefer yours.
Last edited by KevinH; Today at 03:09 PM.
|