summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_pushbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/formfiller/cffl_pushbutton.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_pushbutton.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/formfiller/cffl_pushbutton.cpp b/fpdfsdk/formfiller/cffl_pushbutton.cpp
index 04db191572..4c9a1ed4cb 100644
--- a/fpdfsdk/formfiller/cffl_pushbutton.cpp
+++ b/fpdfsdk/formfiller/cffl_pushbutton.cpp
@@ -21,6 +21,8 @@ std::unique_ptr<CPWL_Wnd> CFFL_PushButton::NewPWLWindow(
const CPWL_Wnd::CreateParams& cp,
std::unique_ptr<CPWL_Wnd::PrivateData> pAttachedData) {
auto pWnd = pdfium::MakeUnique<CPWL_PushButton>(std::move(pAttachedData));
- pWnd->Create(cp);
+ if (cp.pParentWnd)
+ cp.pParentWnd->AddChild(pWnd.get());
+ pWnd->Realize(cp);
return std::move(pWnd);
}