From f913668e0d23a691ce21bf988d15496fcb30bb81 Mon Sep 17 00:00:00 2001 From: topic2k Date: Wed, 23 Oct 2019 09:26:20 +0200 Subject: [PATCH] Use default position for PopupMenu in wx.lib.agw.ribbon.buttonbar.RibbonButtonBarEvent --- wx/lib/agw/ribbon/buttonbar.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/wx/lib/agw/ribbon/buttonbar.py b/wx/lib/agw/ribbon/buttonbar.py index 31d136f7..77e6ee68 100644 --- a/wx/lib/agw/ribbon/buttonbar.py +++ b/wx/lib/agw/ribbon/buttonbar.py @@ -210,17 +210,7 @@ class RibbonButtonBarEvent(wx.PyCommandEvent): :param `menu`: an instance of :class:`wx.Menu`. """ - pos = wx.Point() - - if self._bar._active_button: - size = self._bar._active_button.base.sizes[self._bar._active_button.size] - btn_rect = wx.Rect() - btn_rect.SetTopLeft(self._bar._layout_offset + self._bar._active_button.position) - btn_rect.SetSize(wx.Size(*size.size)) - pos = btn_rect.GetBottomLeft() - pos.y += 1 - - return self._bar.PopupMenu(menu, pos) + return self._bar.PopupMenu(menu) class RibbonButtonBar(RibbonControl):