summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-05 09:49:07 +0000
committerSzymon Kłos <szymon.klos@collabora.com>2021-05-25 12:12:32 +0200
commit3af9e0d7087c25ebf92f4654c4ae3086ec3303eb (patch)
tree596c475cc8c08f7eca4d86c05a84a52b348a45ff /sd
parentc627e3a048f16d265946e80ba6a7cf9b0c52b224 (diff)
use valueset as the menu parent
Change-Id: I99c4bc5110ce494287342db5c2d4c42b1a79ee38 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111993 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 34da188891b3..0ed42c62bc84 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -208,11 +208,11 @@ void MasterPagesSelector::ShowContextMenu(const Point* pPos)
aPosition = *pPos;
// Setup the menu.
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, GetContextMenuUIFile()));
+ weld::Widget* pParent = mxPreviewValueSet->GetDrawingArea();
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pParent, GetContextMenuUIFile()));
std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu("menu"));
ProcessPopupMenu(*xMenu);
::tools::Rectangle aRect(aPosition, Size(1,1));
- weld::Window* pParent = weld::GetPopupParent(*this, aRect);
// Show the menu.
ExecuteCommand(xMenu->popup_at_rect(pParent, aRect));
}