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.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 27cfe514c8..ed2ac1a971 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -638,7 +638,6 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
m_curMatrix = *pUser2Device;
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFXFA_Page* pPage = GetPDFXFAPage();
-
if (pPage == NULL)
return;
@@ -718,8 +717,9 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXWidgetAtPoint(FX_FLOAT pageX,
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_AnnotIterator annotIterator(this, false);
while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) {
- if (pSDKAnnot->GetType() == "Widget" ||
- pSDKAnnot->GetType() == FSDK_XFAWIDGET_TYPENAME) {
+ bool bHitTest = pSDKAnnot->GetType() == "Widget";
+ bHitTest = bHitTest || pSDKAnnot->GetType() == FSDK_XFAWIDGET_TYPENAME;
+ if (bHitTest) {
pAnnotMgr->Annot_OnGetViewBBox(this, pSDKAnnot);
CPDF_Point point(pageX, pageY);
if (pAnnotMgr->Annot_OnHitTest(this, pSDKAnnot, point))
@@ -815,7 +815,6 @@ CPDF_Page* CPDFSDK_PageView::GetPDFPage() {
if (m_page) {
return m_page->GetPDFPage();
}
-
return NULL;
}