summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_baannothandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/cpdfsdk_baannothandler.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_baannothandler.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_baannothandler.cpp b/fpdfsdk/cpdfsdk_baannothandler.cpp
index 10071045ff..f0d67f4617 100644
--- a/fpdfsdk/cpdfsdk_baannothandler.cpp
+++ b/fpdfsdk/cpdfsdk_baannothandler.cpp
@@ -62,13 +62,16 @@ void CPDFSDK_BAAnnotHandler::DeleteAnnot(CPDFSDK_Annot* pAnnot) {}
void CPDFSDK_BAAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
CFX_RenderDevice* pDevice,
- CFX_Matrix* pUser2Device) {
+ CFX_Matrix* pUser2Device,
+ bool bDrawAnnots) {
#ifdef PDF_ENABLE_XFA
if (pAnnot->IsXFAField())
return;
#endif // PDF_ENABLE_XFA
- static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance(
- pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
+ if (bDrawAnnots && pAnnot->GetAnnotSubtype() == CPDF_Annot::Subtype::POPUP) {
+ static_cast<CPDFSDK_BAAnnot*>(pAnnot)->DrawAppearance(
+ pDevice, pUser2Device, CPDF_Annot::Normal, nullptr);
+ }
}
void CPDFSDK_BAAnnotHandler::OnDelete(CPDFSDK_Annot* pAnnot) {}