summaryrefslogtreecommitdiff
path: root/vcl/jsdialog/jsdialogbuilder.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-06-17 11:50:26 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-07-28 14:33:05 +0200
commit333f0cb495c64439ebd77e86a58297d455b71a13 (patch)
tree95fbddb6d0cf4d977bd1411181c75aae071e0e4c /vcl/jsdialog/jsdialogbuilder.cxx
parent79eab8450b3a9db343a082e6d450764643340a3e (diff)
jsdialog: handle popover close
Change-Id: I8b5afe7438c57cfe0553475131bed1e3c4921f46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117373 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119598 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl/jsdialog/jsdialogbuilder.cxx')
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index a0b17f23bf08..65414c46ed5f 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -909,7 +909,7 @@ std::unique_ptr<weld::MenuButton> JSInstanceBuilder::weld_menu_button(const OStr
std::unique_ptr<weld::Popover> JSInstanceBuilder::weld_popover(const OString& id)
{
DockingWindow* pDockingWindow = m_xBuilder->get<DockingWindow>(id);
- std::unique_ptr<weld::Popover> pRet(
+ std::unique_ptr<weld::Popover> pWeldWidget(
pDockingWindow ? new JSPopover(this, pDockingWindow, this, false) : nullptr);
if (pDockingWindow)
{
@@ -927,7 +927,11 @@ std::unique_ptr<weld::Popover> JSInstanceBuilder::weld_popover(const OString& id
initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON());
}
}
- return pRet;
+
+ if (pWeldWidget)
+ RememberWidget("__POPOVER__", pWeldWidget.get());
+
+ return pWeldWidget;
}
weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent,