diff --git a/common/widgets/properties_panel.cpp b/common/widgets/properties_panel.cpp index eeaee81324..89434f7c24 100644 --- a/common/widgets/properties_panel.cpp +++ b/common/widgets/properties_panel.cpp @@ -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( "<...>" ) );