Properties: Fixed a startup crash

This commit is contained in:
Maciej Suminski 2020-04-07 20:13:19 +02:00 committed by Jon Evans
parent af71d42307
commit 990ea5595e
1 changed files with 7 additions and 0 deletions

View File

@ -28,11 +28,18 @@
using namespace std;
extern wxPGGlobalVarsClass* wxPGGlobalVars;
PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
: wxPanel( aParent ), m_frame( aFrame )
{
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 ),
wxPG_AUTO_SORT | wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE );
m_grid->SetUnspecifiedValueAppearance( wxPGCell( "<...>" ) );