Stop forwarding DoPopupMenu() to wxGenericListCtrl main window
There doesn't seem to be anything wrong with just showing the popup menu in this window itself and this avoids the need to do any coordinate adjustments, which didn't work correctly for the menus shown over the header window after the previous commit (and hadn't worked correctly for the menus shown over the non-header area before it). See #18133.
This commit is contained in:
@@ -5464,21 +5464,6 @@ wxColour wxGenericListCtrl::GetForegroundColour() const
|
||||
return m_mainWin ? m_mainWin->GetForegroundColour() : wxColour();
|
||||
}
|
||||
|
||||
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;
|
||||
#endif
|
||||
}
|
||||
|
||||
wxSize wxGenericListCtrl::DoGetBestClientSize() const
|
||||
{
|
||||
// The base class version can compute the best size in report view only.
|
||||
|
Reference in New Issue
Block a user