[Libreoffice-commits] core.git: dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 21 15:03:03 UTC 2020
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit f62e5eaf5fa0bff571331e1adad518489929272d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Dec 21 09:21:42 2020 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Dec 21 16:02:20 2020 +0100
weld querycolmenu
Change-Id: I0b4e27b15b1526eb7122bc5eec98f8d389e58de1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108084
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 2b0104a4374f..38c51605a2e9 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1946,12 +1946,14 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
if (!static_cast<OQueryController&>(getDesignView()->getController()).isReadOnly())
{
- VclBuilder aBuilder(nullptr, AllSettings::GetUIRootDir(), "dbaccess/ui/querycolmenu.ui", "");
- VclPtr<PopupMenu> aContextMenu(aBuilder.get_menu("menu"));
- sal_uInt16 nItemId = aContextMenu->Execute(this, aMenuPos);
- if (nItemId == aContextMenu->GetItemId("delete"))
+ ::tools::Rectangle aRect(aMenuPos, Size(1, 1));
+ weld::Window* pPopupParent = weld::GetPopupParent(*this, aRect);
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "dbaccess/ui/querycolmenu.ui"));
+ std::unique_ptr<weld::Menu> xContextMenu(xBuilder->weld_menu("menu"));
+ OString sIdent = xContextMenu->popup_at_rect(pPopupParent, aRect);
+ if (sIdent == "delete")
RemoveField(nColId);
- else if (nItemId == aContextMenu->GetItemId("width"))
+ else if (sIdent == "width")
adjustBrowseBoxColumnWidth( this, nColId );
}
}
More information about the Libreoffice-commits
mailing list