Properties: Fixed a startup crash
This commit is contained in:
parent
af71d42307
commit
990ea5595e
|
@ -28,11 +28,18 @@
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
extern wxPGGlobalVarsClass* wxPGGlobalVars;
|
||||||
|
|
||||||
PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
|
PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
|
||||||
: wxPanel( aParent ), m_frame( aFrame )
|
: wxPanel( aParent ), m_frame( aFrame )
|
||||||
{
|
{
|
||||||
wxBoxSizer* mainSizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
// on some platforms wxPGGlobalVars is initialized automatically,
|
||||||
|
// but others need an explicit init
|
||||||
|
if( !wxPGGlobalVars )
|
||||||
|
wxPGInitResourceModule();
|
||||||
|
|
||||||
m_grid = new wxPropertyGrid( this, wxID_ANY, wxDefaultPosition, wxSize( 300, 400 ),
|
m_grid = new wxPropertyGrid( this, wxID_ANY, wxDefaultPosition, wxSize( 300, 400 ),
|
||||||
wxPG_AUTO_SORT | wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE );
|
wxPG_AUTO_SORT | wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE );
|
||||||
m_grid->SetUnspecifiedValueAppearance( wxPGCell( "<...>" ) );
|
m_grid->SetUnspecifiedValueAppearance( wxPGCell( "<...>" ) );
|
||||||
|
|
Loading…
Reference in New Issue