poppler/Annot.cc |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit bae836cd3dd3511ca9cf4745626142334bafd1a6
Author: Marek Kasik <[email protected]>
Date:   Sun May 4 16:20:33 2014 +0200

    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.
    
    Bug #75979

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index ab48be6..fa29739 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -29,6 +29,7 @@
 // Copyright (C) 2012 Tobias Koenig <[email protected]>
 // Copyright (C) 2013 Peter Breitenlohner <[email protected]>
 // Copyright (C) 2013 Adrian Johnson <[email protected]>
+// Copyright (C) 2014 Marek Kasik <[email protected]>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -4926,7 +4927,8 @@ void AnnotWidget::drawFormFieldButton(GfxResources 
*resources, GooString *da) {
   switch (static_cast<FormFieldButton *>(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<FormFieldButton 
*>(field)->getState(appearState->getCString())) {
       if (caption) {
         drawText(caption, da, resources, gFalse, 0, fieldQuadCenter,
                  gFalse, gTrue);
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to