Fix position of popup menus in wxGenericListCtrl
The position was off by the header height due to a missing translation between wxGenericListCtrl and wxListMainWindow, in which the menu is actually shown, coordinates. Closes #18133.
This commit is contained in:
parent
67cb0ad260
commit
0446382e82
@ -5467,6 +5467,12 @@ wxColour wxGenericListCtrl::GetForegroundColour() const
|
||||
bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
// Coordinates here are given in this control coordinates system, but
|
||||
// PopupMenu() wants them in the coordinates system of the window it's
|
||||
// called on, so transform them.
|
||||
ClientToScreen(&x, &y);
|
||||
m_mainWin->ScreenToClient(&x, &y);
|
||||
|
||||
return m_mainWin->PopupMenu( menu, x, y );
|
||||
#else
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user