summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_annot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_annot.cpp')
-rw-r--r--core/fpdfdoc/cpdf_annot.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index eab6cd0145..e0f073f394 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -34,9 +34,10 @@ bool IsTextMarkupAnnotation(CPDF_Annot::Subtype type) {
}
bool ShouldGenerateAPForAnnotation(CPDF_Dictionary* pAnnotDict) {
- // If AP dictionary exists, we use the appearance defined in the
- // existing AP dictionary.
- if (pAnnotDict->KeyExist("AP"))
+ // If AP dictionary exists and defines an appearance for normal mode, we use
+ // the appearance defined in the existing AP dictionary.
+ CPDF_Dictionary* pAP = pAnnotDict->GetDictFor("AP");
+ if (pAP && pAP->GetDictFor("N"))
return false;
return !CPDF_Annot::IsAnnotationHidden(pAnnotDict);