Don't rely on dynamic_cast across DLLs
See https://gitlab.com/kicad/code/kicad/-/issues/16998
This commit is contained in:
parent
539bd62a7b
commit
e9456201a7
|
@ -134,6 +134,7 @@ PGM_BASE::PGM_BASE()
|
|||
m_argcUtf8 = 0;
|
||||
m_argvUtf8 = nullptr;
|
||||
m_splash = nullptr;
|
||||
m_PropertyGridInitialized = false;
|
||||
|
||||
setLanguageId( wxLANGUAGE_DEFAULT );
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <eda_base_frame.h>
|
||||
#include <eda_item.h>
|
||||
#include <import_export.h>
|
||||
#include <pgm_base.h>
|
||||
#include <properties/pg_cell_renderer.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -65,10 +66,11 @@ PROPERTIES_PANEL::PROPERTIES_PANEL( wxWindow* aParent, EDA_BASE_FRAME* aFrame )
|
|||
wxPGEditor_DatePickerCtrl = nullptr;
|
||||
}
|
||||
|
||||
if( !dynamic_cast<PG_CELL_RENDERER*>( wxPGGlobalVars->m_defaultRenderer ) )
|
||||
if( !Pgm().m_PropertyGridInitialized )
|
||||
{
|
||||
delete wxPGGlobalVars->m_defaultRenderer;
|
||||
wxPGGlobalVars->m_defaultRenderer = new PG_CELL_RENDERER();
|
||||
Pgm().m_PropertyGridInitialized = true;
|
||||
}
|
||||
|
||||
m_caption = new wxStaticText( this, wxID_ANY, _( "No objects selected" ) );
|
||||
|
|
|
@ -377,6 +377,8 @@ public:
|
|||
|
||||
bool m_Quitting;
|
||||
|
||||
bool m_PropertyGridInitialized;
|
||||
|
||||
protected:
|
||||
/// Loads internal settings from COMMON_SETTINGS
|
||||
void loadCommonSettings();
|
||||
|
|
Loading…
Reference in New Issue