summaryrefslogtreecommitdiff
path: root/fpdfsdk/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorjinming_wang <jinming_wang@foxitsoftware.com>2016-03-18 16:35:40 +0800
committerjinming_wang <jinming_wang@foxitsoftware.com>2016-03-18 16:35:40 +0800
commita1cef70c08a16e2b9d7ec14987a8b20660d83534 (patch)
treebaf5d5e71a2d33fca8793288e97e77a28a00f6ac /fpdfsdk/fsdk_mgr.cpp
parent900323a8857ce0d9f6a57e535cd864b0f649bb9c (diff)
downloadpdfium-a1cef70c08a16e2b9d7ec14987a8b20660d83534.tar.xz
Trigger page view event when re-layout is finished
BUG=pdfium:401 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1758553003 .
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/fsdk_mgr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp
index 423bb8263a..1ff1ca7ca3 100644
--- a/fpdfsdk/fsdk_mgr.cpp
+++ b/fpdfsdk/fsdk_mgr.cpp
@@ -858,6 +858,13 @@ FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
pPage->GetDocument()->GetDocType() != DOCTYPE_DYNAMIC_XFA))
return FALSE;
+ if (GetFocusAnnot() == pAnnot)
+ KillFocusAnnot();
+ CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
+ CPDFSDK_AnnotHandlerMgr* pAnnotHandler = pEnv->GetAnnotHandlerMgr();
+ if (pAnnotHandler)
+ pAnnotHandler->ReleaseAnnot(pAnnot);
+
auto it = std::find(m_fxAnnotArray.begin(), m_fxAnnotArray.end(), pAnnot);
if (it != m_fxAnnotArray.end())
m_fxAnnotArray.erase(it);