OSX: Ignore wxHSCROLL and wxVSCROLL in wxDataViewCtrl

Using these two style flags in wxDataViewCtrl causes the library
to seg fault when trying to create the scrollbars. The wxDataViewCtrl
has scrollbars already without these flags.

Closes #17028
This commit is contained in:
Ian McInerney
2020-01-23 23:23:18 +00:00
parent 278d98b2b6
commit f5c3d9d1fb

View File

@@ -365,6 +365,10 @@ bool wxDataViewCtrl::Create(wxWindow *parent,
const wxValidator& validator,
const wxString& name)
{
// Remove wxVSCROLL and wxHSCROLL from the style, since the dataview panel has scrollbars
// by default, and wxControl::Create trys to make some but crashes in the process
style &= ~(wxVSCROLL | wxHSCROLL);
DontCreatePeer();
if (!(wxControl::Create(parent,id,pos,size,style,validator,name)))
return false;