Don't assert in wxRenderer::GetHeaderButtonMargin()

Even if we don't have any way to determine the real margin, don't assert in
this method implementation in wxGTK and wxOSX, but just return 0 instead.

This fixes asserts when trying to fit a column of wxDataViewCtrl, by double
clicking a separator after it, to its contents.

See #13685.
This commit is contained in:
Vadim Zeitlin 2016-06-16 17:26:38 +02:00
parent e9fdda8638
commit 857a8a1ba1
2 changed files with 2 additions and 4 deletions

View File

@ -269,8 +269,7 @@ int wxRendererGTK::GetHeaderButtonHeight(wxWindow *WXUNUSED(win))
int wxRendererGTK::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
{
wxFAIL_MSG( "GetHeaderButtonMargin() not implemented" );
return -1;
return 0; // TODO: How to determine the real margin?
}

View File

@ -251,8 +251,7 @@ int wxRendererMac::GetHeaderButtonHeight(wxWindow* WXUNUSED(win))
int wxRendererMac::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
{
wxFAIL_MSG( "GetHeaderButtonMargin() not implemented" );
return -1;
return 0; // TODO: How to determine the real margin?
}
void wxRendererMac::DrawTreeItemButton( wxWindow *win,