Closed lbergelson closed 1 year ago
@lbergelson when does this lambda function (sort) ever get removed from the actionToPerformOnFrameLoad cache? The purpose seems to be to defer sorting for this frame, but as far as I can see this never gets removed. Won't it get invoked repeatedly, rather than once (which seems to be the intent).
This doesn't seem to be added in this PR, I just noticed it looking into the bug you posted above.
actionToPerformOnFrameLoad.put(frame, sort);
@jrobinso It should be removed when it's executed. If you look at where it's called, it's in a "computeIfPresent" block and after executing it returns null which removes it. I could replace it which a remove() and != null check if you think that's more readable.
Major rework of the previous alignment dialog popup to make it interactive and clearer. Use it to navigate between reads in a supplemetnary alignment group. Click to move to the selected read. Shift + Click to add it as a split screen.
When jumping to a selected read/mate the selected reads will be now be sorted to the top. @jrobinso There's currently a nondeterministic bug here, sometimes the sorting crashes with an NPE because the interval isn't loaded. I'm misunderstanding something about the loading code. It would be easy to fix it so it doesn't blow up by checking the interval for null, but then we'd just have the problem that it sometimes isn't putting the selected reads at the top mysteriously. I left it to blow up so that it's obvious when it happens so we can notice / fix it. I'm a bit puzzled by it
Renamed several classes and moved them to the ui/supdiagram package Refactoring some methods around Frame creation, this could still be improved.