summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 6d656a0c14..56f8204ce9 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -1118,6 +1118,18 @@ void CPDFSDK_PageView::LoadFXAnnots() {
SetLock(FALSE);
}
+void CPDFSDK_PageView::ClearFXAnnots() {
+ SetLock(TRUE);
+ if (m_pSDKDoc && GetFocusAnnot())
+ m_pSDKDoc->SetFocusAnnot(nullptr);
+ m_CaptureWidget = nullptr;
+ for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray)
+ m_pSDKDoc->GetEnv()->GetAnnotHandlerMgr()->ReleaseAnnot(pAnnot);
+ m_fxAnnotArray.clear();
+ m_pAnnotList.reset();
+ SetLock(FALSE);
+}
+
void CPDFSDK_PageView::UpdateRects(CFX_RectArray& rects) {
for (int i = 0; i < rects.GetSize(); i++) {
CPDF_Rect rc = rects.GetAt(i);