Try to fix some issues (OSX crashes and build and seg fault under linux)
This commit is contained in:
parent
4c001cd4ed
commit
c4edb215fa
|
@ -63,18 +63,26 @@ END_EVENT_TABLE()
|
|||
|
||||
/*************************************************************************/
|
||||
Pcb3D_GLCanvas::Pcb3D_GLCanvas( WinEDA3D_DrawFrame* parent ) :
|
||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
||||
wxGLCanvas( parent, -1, NULL, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE )
|
||||
#else
|
||||
wxGLCanvas( parent, -1, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE )
|
||||
#endif
|
||||
/*************************************************************************/
|
||||
{
|
||||
m_init = FALSE;
|
||||
m_gllist = 0;
|
||||
m_Parent = parent;
|
||||
|
||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
||||
// Explicitly create a new rendering context instance for this canvas.
|
||||
m_glRC = new wxGLContext(this);
|
||||
|
||||
// Make the new context current (activate it for use) with this canvas.
|
||||
SetCurrent(*m_glRC);
|
||||
#else
|
||||
SetCurrent(NULL);
|
||||
#endif
|
||||
DisplayStatus();
|
||||
}
|
||||
|
||||
|
@ -85,7 +93,9 @@ Pcb3D_GLCanvas::~Pcb3D_GLCanvas()
|
|||
{
|
||||
ClearLists();
|
||||
m_init = FALSE;
|
||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
||||
delete m_glRC;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -46,7 +46,11 @@ static GLfloat Get3DLayerSide( int act_layer );
|
|||
void Pcb3D_GLCanvas::Redraw( bool finish )
|
||||
/******************************************/
|
||||
{
|
||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
||||
SetCurrent(*m_glRC);
|
||||
#else
|
||||
SetCurrent(NULL);
|
||||
#endif
|
||||
InitGL();
|
||||
|
||||
glMatrixMode( GL_MODELVIEW ); /* position viewer */
|
||||
|
|
|
@ -79,7 +79,9 @@ public:
|
|||
private:
|
||||
bool m_init;
|
||||
GLuint m_gllist;
|
||||
#if wxCHECK_VERSION( 2, 9, 0 )
|
||||
wxGLContext* m_glRC;
|
||||
#endif
|
||||
|
||||
public:
|
||||
Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent );
|
||||
|
|
|
@ -119,13 +119,14 @@ NETLIST_OBJECT::NETLIST_OBJECT()
|
|||
m_Label = 0; /* For all labels:pointer on the text label */
|
||||
}
|
||||
|
||||
|
||||
// Copy constructor
|
||||
NETLIST_OBJECT::NETLIST_OBJECT( NETLIST_OBJECT& aSource )
|
||||
{
|
||||
*this = aSource;
|
||||
m_Label = NULL; // set to null because some items are owner, so the delete operator can create problems
|
||||
// if this member is copied here (if 2 different items are owner of the same object)
|
||||
}
|
||||
|
||||
|
||||
NETLIST_OBJECT::~NETLIST_OBJECT()
|
||||
{
|
||||
/* NETLIST_OBJECT is owner of m_Label only if its type is
|
||||
|
|
|
@ -740,7 +740,6 @@ static int ConvertBusToMembers( NETLIST_OBJECT_LIST& aNetItemBuffer,
|
|||
{
|
||||
NETLIST_OBJECT* new_label = new NETLIST_OBJECT( BusLabel );
|
||||
NumItem++;
|
||||
|
||||
/* Convertion du BusLabel en la racine du Label + le numero du fil */
|
||||
BufLine = BusLabel.m_Label->Left( RootBusNameLength );
|
||||
BufLine << BusMember;
|
||||
|
|
Loading…
Reference in New Issue