Fix re-enabling "Jump to entry" for "linked" tokens in Field editors#8456
Fix re-enabling "Jump to entry" for "linked" tokens in Field editors#8456k3KAW8Pnf7mkmdSMPHz27 wants to merge 3 commits into
Conversation
|
To be honest, I also see no other easy option to get access to the main table or the library tab here. |
|
Not sure about easy but the following would work I guess:
|
|
I look so much forward to test this |
|
@tobiasdiez I tried to look around as well in this because of these indexOutOfBound exceptions always occurring with regards to selectedItems and the ChangeListener. And we never really use it. We just clear the selection in the state manager on tab switching (I hate the f*cking TableView) |
|
Yes you cannot bind it directly, but our helper methods allow custom binding methods and you could use the clearAndSelect method there to transfer changes from the statemanager to the selection model https://docs.oracle.com/javafx/2/api/javafx/scene/control/SelectionModel.html#clearAndSelect(int). |
|
It can be done, the problem is that the complexity is number_of_entries * number_of_selection (because when we select multiple entries we have to use their indices) unless we add some extra data structure behind it all. |
|
@Siedlerchr where are those
I am starting to understand why 😛 |
|
@k3KAW8Pnf7mkmdSMPHz27 I don't really understand your complexity calculation. For what is this the complexity? For keeping the lists in sync? |
|
@tobiasdiez yes. For setting multiple bibentries as selected. To mark bibentries as selected you need to first find their indices in the (maintable) list |
|
Thanks for the clarification. Makes sense. There is also a select method that takes an item (not its index) as the argument, but I'm not sure how this is implemented in the end. But I also wouldn't invest too much energy into finding the most performant implementation as this method is not called that often and only in response to a user action (so it doesn't really matter if it takes a couple of ms longer). That being said, if you have a nice solution, go for it! |
|
@k3KAW8Pnf7mkmdSMPHz27 I was referring to #8394 the exception occurred as well when I switched groups etc, not only when deleting entries. |
|
DevCall decision:
|
See #8719 for a typical example of an index out of bounds issue that may possibly negatively impact this very pull request. |
|
We fixed the jump to entry in the PR #10578. |
|
The logic for the UI will be implemented in #11009. Thus, closing this. |
Fixes #5484 by enabling "Jump to entry" for,
CROSSREFXREFENTRYSETIDSRELATEDXDATAin the Entry Editor.
I have only verified it for
CROSSREFsince I don't know how the others are supposed to work. But, since this is re-enabling a feature disabled in #2840 I expect that it is how things used to be.@tobiasdiez there is a risk this is doing almost exactly what you didn't want in #2840 (directly use the
JabRefFrameclass).Todo:
CHANGELOG.mdCHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)