Fix action helper when no library is open#6402
Conversation
|
A fix using |
…ptyLib * upstream/master: (23 commits) Make wrap fields also visible in entry editor (#6315) Add launcher to fix extension import in snap (#6439) add concise message when SaveException happen (#6444) Squashed 'src/main/resources/csl-locales/' changes from 79845b087b..cbb45961b8 Squashed 'src/main/resources/csl-styles/' changes from 906cd6d..270cd32 Addition to the early pull #6438 (#6441) Fix the bug #6421 (#6438) Cleanup dead code (#6436) Fixed entry duplication on file download (#6437) Add workaround for buildSrc issue (#6433) Remove dash from illegal characters. (#6300) Docs: For developers: New architectural decision added to list (#6397) Added a download checkbox to the import dialog (#6381) Bump jaxb-xjc from 2.3.2 to 2.3.3 (#6410) Bump flexmark-ext-gfm-strikethrough from 0.61.20 to 0.61.24 (#6413) Bump byte-buddy-parent from 1.10.9 to 1.10.10 (#6408) Bump flexmark-ext-gfm-tasklist from 0.61.20 to 0.61.24 (#6412) Bump org.beryx.jlink from 2.17.8 to 2.18.0 (#6411) Bump tika-core from 1.24 to 1.24.1 (#6409) Bump flexmark from 0.61.20 to 0.61.24 (#6416) ...
|
@tobiasdiez Thanks for the hint, I refactored it now. Seems to still work. I am not that into those Binding stuff, I am wondering about the FieldBinding, that seems uncessary now? |
|
|
||
| ObservableList<BibEntry> selectedEntries = stateManager.getSelectedEntries(); | ||
| MonadicObservableValue<Boolean> fileIsPresent = EasyBind.monadic(Bindings.valueAt(selectedEntries, 0)).map(entry -> { | ||
| List<LinkedFile> files = entry.getFiles(); |
There was a problem hiding this comment.
I think this does not update the status if a file is added to the currently selected entry. For this, the isAnyFieldSetForSelectedEntry method uses flatMap instead of map.
There was a problem hiding this comment.
I just tested it, it works as well when I add or remove a file to an entry both the context menu and the View menu get updated with the correct status
9926b48cf3 Create biomolecular-concepts.csl (#6355) 4b4ebeeeba Create life-science-alliance.csl (#6353) 153790afc9 Update ucl-university-college-apa.csl (#6390) a30604c0b4 Update geophysical-journal-international.csl (#6385) 3fda5f30ca Create nursing-open.csl (#6402) 103b607948 Update natur-und-landschaft.csl (#6404) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 9926b48cf3e20e60142e35b3cd160015aebed9d3
This fixes #6430 an exception when opening the View menu with an empty library