Allow toggling off all radio buttons
Hi, in this block of code https://gitlab.freedesktop.org/poppler/poppler/-/blob/3d49757055dbcd2876c0b26ee00a7bd780541938/poppler/Form.cc#L1353-1354 you disallow turning off all radio buttons which in general might make sense but I have at least two cases in which this would need to be skipped:
- A user is filling out a form with two radio buttons, selects one of them, presses undo in the PDF reader (e.g. Okular) but poppler doesn't accept the undo leaving one of the checkboxes checked.
- Similar scenario as above but the user wants to consciously not check any radio buttons after one of them has already been checked in a form. This is not possible due to the poppler check.
I do have a WIP patch for Okular which allows deselecting a radio button group but it currently fails at doing so. Removing the return
in the block linked above does allow this to happen.
Can we add a new public parameter to setState (allToggleOff
?) that allows applications to achieve this?
I'm testing with the following pdf: https://www.help.gv.at/Portal.Node/hlpd/public/resources/documents/meldez.pdf , there are many radio buttons to try on.
Kind regards