Ignore system colour change events in not yet initialized wxPropertyGrid.
Handling these events before the initialization was over could result in a crash because m_categoryDefaultCell wasn't yet initialized when the window was created. Fix this by ignoring these events during initialization. Closes #15642. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@75128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1297,8 +1297,10 @@ void wxPropertyGrid::CalculateFontAndBitmapStuff( int vspacing )
|
|||||||
|
|
||||||
void wxPropertyGrid::OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) )
|
void wxPropertyGrid::OnSysColourChanged( wxSysColourChangedEvent &WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
RegainColours();
|
if ((m_iFlags & wxPG_FL_INITIALIZED)!=0) {
|
||||||
Refresh();
|
RegainColours();
|
||||||
|
Refresh();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user