Save initial wxPropertyGridManager extra style
Extra style bits used while initializing wxPropertyGridManager are not saved and therefore cannot be returned by GetExtraStyle(). We need to save them in a standard way to make them accessible for this function. See #18813.
This commit is contained in:
@@ -551,6 +551,7 @@ void wxPropertyGridManager::Init2( int style )
|
|||||||
|
|
||||||
propGridFlags &= ~wxBORDER_MASK;
|
propGridFlags &= ~wxBORDER_MASK;
|
||||||
|
|
||||||
|
long pgManExStyle = 0;
|
||||||
if ((style & wxPG_NO_INTERNAL_BORDER) == 0)
|
if ((style & wxPG_NO_INTERNAL_BORDER) == 0)
|
||||||
{
|
{
|
||||||
propGridFlags |= wxBORDER_THEME;
|
propGridFlags |= wxBORDER_THEME;
|
||||||
@@ -558,7 +559,7 @@ void wxPropertyGridManager::Init2( int style )
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
propGridFlags |= wxBORDER_NONE;
|
propGridFlags |= wxBORDER_NONE;
|
||||||
wxWindow::SetExtraStyle(wxPG_EX_TOOLBAR_SEPARATOR);
|
pgManExStyle |= wxPG_EX_TOOLBAR_SEPARATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create propertygrid.
|
// Create propertygrid.
|
||||||
@@ -573,11 +574,12 @@ void wxPropertyGridManager::Init2( int style )
|
|||||||
m_pState = m_pPropGrid->m_pState;
|
m_pState = m_pPropGrid->m_pState;
|
||||||
|
|
||||||
// Rely on native double-buffering by default.
|
// Rely on native double-buffering by default.
|
||||||
|
long pgExStyle = wxPG_EX_INIT_NOCAT;
|
||||||
#if wxALWAYS_NATIVE_DOUBLE_BUFFER
|
#if wxALWAYS_NATIVE_DOUBLE_BUFFER
|
||||||
m_pPropGrid->SetExtraStyle(wxPG_EX_INIT_NOCAT | wxPG_EX_NATIVE_DOUBLE_BUFFERING);
|
pgExStyle |= wxPG_EX_NATIVE_DOUBLE_BUFFERING;
|
||||||
#else
|
#endif // wxALWAYS_NATIVE_DOUBLE_BUFFER
|
||||||
m_pPropGrid->SetExtraStyle(wxPG_EX_INIT_NOCAT);
|
m_pPropGrid->SetExtraStyle(pgExStyle);
|
||||||
#endif // wxALWAYS_NATIVE_DOUBLE_BUFFER/!wxALWAYS_NATIVE_DOUBLE_BUFFER
|
wxWindow::SetExtraStyle(pgManExStyle | pgExStyle);
|
||||||
|
|
||||||
// Connect to property grid onselect event.
|
// Connect to property grid onselect event.
|
||||||
// NB: Even if wxID_ANY is used, this doesn't connect properly in wxPython
|
// NB: Even if wxID_ANY is used, this doesn't connect properly in wxPython
|
||||||
|
Reference in New Issue
Block a user