summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_baannot.cpp7
-rw-r--r--fpdfsdk/cpdfsdk_baannot.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp
index 711d228ec3..c551fee799 100644
--- a/fpdfsdk/cpdfsdk_baannot.cpp
+++ b/fpdfsdk/cpdfsdk_baannot.cpp
@@ -353,3 +353,10 @@ void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) {
if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot())
pAnnot->SetOpenState(bOpenState);
}
+
+int CPDFSDK_BAAnnot::GetLayoutOrder() const {
+ if (m_pAnnot->GetSubtype() == CPDF_Annot::Subtype::POPUP)
+ return 1;
+
+ return CPDFSDK_Annot::GetLayoutOrder();
+}
diff --git a/fpdfsdk/cpdfsdk_baannot.h b/fpdfsdk/cpdfsdk_baannot.h
index 1d71585a35..c7300c46e5 100644
--- a/fpdfsdk/cpdfsdk_baannot.h
+++ b/fpdfsdk/cpdfsdk_baannot.h
@@ -92,6 +92,8 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
void SetOpenState(bool bState);
+ int GetLayoutOrder() const override;
+
protected:
CFX_UnownedPtr<CPDF_Annot> const m_pAnnot;
};