From 17fa545e74357a3d6c5f50a5c3488c0d8973d33d Mon Sep 17 00:00:00 2001 From: Marek Kasik Date: Mon, 10 Mar 2014 14:35:14 +0100 Subject: [PATCH] Use field value V for radio buttons Turn on radio button only if its appearance state is equal to the value of name object "V" of the field. --- poppler/Annot.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poppler/Annot.cc b/poppler/Annot.cc index ab48be6..aa123a7 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -4926,7 +4926,8 @@ void AnnotWidget::drawFormFieldButton(GfxResources *resources, GooString *da) { switch (static_cast(field)->getButtonType()) { case formButtonRadio: { //~ Acrobat doesn't draw a caption if there is no AP dict (?) - if (appearState && appearState->cmp("Off") != 0) { + if (appearState && appearState->cmp("Off") != 0 && + static_cast(field)->getState(appearState->getCString())) { if (caption) { drawText(caption, da, resources, gFalse, 0, fieldQuadCenter, gFalse, gTrue); -- 1.8.5.3