Commit ffd727ef authored by charras's avatar charras

minor changes

parent 1f34ed05
...@@ -493,11 +493,11 @@ void Pcb3D_GLCanvas::OnPaint( wxPaintEvent& event ) ...@@ -493,11 +493,11 @@ void Pcb3D_GLCanvas::OnPaint( wxPaintEvent& event )
void Pcb3D_GLCanvas::OnSize( wxSizeEvent& event ) void Pcb3D_GLCanvas::OnSize( wxSizeEvent& event )
/**********************************************/ /**********************************************/
{ {
int w, h;
// set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
// this is also necessary to update the context on some platforms // this is also necessary to update the context on some platforms
wxGLCanvas::OnSize( event ); wxGLCanvas::OnSize( event );
// set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
int w, h;
GetClientSize( &w, &h ); GetClientSize( &w, &h );
#ifndef __WXMOTIF__ #ifndef __WXMOTIF__
if( GetContext() ) if( GetContext() )
...@@ -506,6 +506,8 @@ void Pcb3D_GLCanvas::OnSize( wxSizeEvent& event ) ...@@ -506,6 +506,8 @@ void Pcb3D_GLCanvas::OnSize( wxSizeEvent& event )
SetCurrent(); SetCurrent();
glViewport( 0, 0, (GLint) w, (GLint) h ); glViewport( 0, 0, (GLint) w, (GLint) h );
} }
event.Skip();
} }
......
...@@ -75,9 +75,7 @@ void Pcb3D_GLCanvas::Redraw( bool finish ) ...@@ -75,9 +75,7 @@ void Pcb3D_GLCanvas::Redraw( bool finish )
glCallList( m_gllist ); glCallList( m_gllist );
else else
{ {
m_gllist = CreateDrawGL_List(); CreateDrawGL_List();
// m_gllist = DisplayCubeforTest(); // Only for test
} }
glFlush(); glFlush();
...@@ -93,7 +91,6 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() ...@@ -93,7 +91,6 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
/* Create the draw list items /* Create the draw list items
*/ */
{ {
GLuint gllist = glGenLists( 1 );
WinEDA_BasePcbFrame* pcbframe = m_Parent->m_Parent; WinEDA_BasePcbFrame* pcbframe = m_Parent->m_Parent;
BOARD* pcb = pcbframe->m_Pcb; BOARD* pcb = pcbframe->m_Pcb;
TRACK* pt_piste; TRACK* pt_piste;
...@@ -101,6 +98,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() ...@@ -101,6 +98,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
wxBusyCursor dummy; wxBusyCursor dummy;
m_gllist = glGenLists( 1 );
pcb->ComputeBoundaryBox(); pcb->ComputeBoundaryBox();
g_Parm_3D_Visu.m_BoardSettings = pcb->m_BoardSettings; g_Parm_3D_Visu.m_BoardSettings = pcb->m_BoardSettings;
g_Parm_3D_Visu.m_BoardSize = pcb->m_BoundaryBox.GetSize(); g_Parm_3D_Visu.m_BoardSize = pcb->m_BoundaryBox.GetSize();
...@@ -134,7 +133,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() ...@@ -134,7 +133,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
g_Parm_3D_Visu.m_LayerZcoord[ECO1_N] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[ECO1_N] = zpos_cmp + zpos_cu;
g_Parm_3D_Visu.m_LayerZcoord[ECO2_N] = zpos_cmp + zpos_cu; g_Parm_3D_Visu.m_LayerZcoord[ECO2_N] = zpos_cmp + zpos_cu;
glNewList( gllist, GL_COMPILE_AND_EXECUTE ); glNewList( m_gllist, GL_COMPILE_AND_EXECUTE );
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE ); glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
...@@ -223,7 +222,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List() ...@@ -223,7 +222,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
GLenum err = glGetError(); GLenum err = glGetError();
if( err != GL_NO_ERROR ) if( err != GL_NO_ERROR )
DisplayError( this, wxT( "Error in GL commands" ) ); DisplayError( this, wxT( "Error in GL commands" ) );
return gllist; return m_gllist;
} }
......
...@@ -309,6 +309,7 @@ void WinEDA3D_DrawFrame::NewDisplay() ...@@ -309,6 +309,7 @@ void WinEDA3D_DrawFrame::NewDisplay()
/*****************************************/ /*****************************************/
{ {
m_Canvas->ClearLists(); m_Canvas->ClearLists();
m_Canvas->CreateDrawGL_List();
m_Canvas->InitGL(); m_Canvas->InitGL();
m_Canvas->DisplayStatus(); m_Canvas->DisplayStatus();
m_Canvas->Refresh( true ); m_Canvas->Refresh( true );
......
...@@ -108,6 +108,7 @@ bool WinEDA_FootprintDisplayOptionsFrame::Create( wxWindow* parent, wxWindowID i ...@@ -108,6 +108,7 @@ bool WinEDA_FootprintDisplayOptionsFrame::Create( wxWindow* parent, wxWindowID i
m_IsShowPadFill = NULL; m_IsShowPadFill = NULL;
m_IsShowPadNum = NULL; m_IsShowPadNum = NULL;
BottomBoxSizer = NULL; BottomBoxSizer = NULL;
m_CancelButton = NULL;
////@end WinEDA_FootprintDisplayOptionsFrame member initialisation ////@end WinEDA_FootprintDisplayOptionsFrame member initialisation
////@begin WinEDA_FootprintDisplayOptionsFrame creation ////@begin WinEDA_FootprintDisplayOptionsFrame creation
...@@ -133,7 +134,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls() ...@@ -133,7 +134,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_FootprintDisplayOptionsFrame content construction ////@begin WinEDA_FootprintDisplayOptionsFrame content construction
// Generated by DialogBlocks, 27/10/2007 09:57:04 (unregistered) // Generated by DialogBlocks, 21/07/2008 15:12:47 (unregistered)
WinEDA_FootprintDisplayOptionsFrame* itemDialog1 = this; WinEDA_FootprintDisplayOptionsFrame* itemDialog1 = this;
...@@ -168,7 +169,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls() ...@@ -168,7 +169,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Display Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Display Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_IsShowPadNum->SetValue(false); m_IsShowPadNum->SetValue(false);
if (ShowToolTips()) if (WinEDA_FootprintDisplayOptionsFrame::ShowToolTips())
m_IsShowPadNum->SetToolTip(_("Display pad number")); m_IsShowPadNum->SetToolTip(_("Display pad number"));
ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5); ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5);
...@@ -188,9 +189,9 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls() ...@@ -188,9 +189,9 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
itemButton13->SetForegroundColour(wxColour(255, 0, 0)); itemButton13->SetForegroundColour(wxColour(255, 0, 0));
BottomBoxSizer->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); BottomBoxSizer->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton14 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); m_CancelButton = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
itemButton14->SetForegroundColour(wxColour(0, 0, 255)); m_CancelButton->SetForegroundColour(wxColour(0, 0, 255));
BottomBoxSizer->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); BottomBoxSizer->Add(m_CancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton15 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 ); wxButton* itemButton15 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
BottomBoxSizer->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); BottomBoxSizer->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
...@@ -201,6 +202,8 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls() ...@@ -201,6 +202,8 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) ); m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) );
m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) ); m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
////@end WinEDA_FootprintDisplayOptionsFrame content construction ////@end WinEDA_FootprintDisplayOptionsFrame content construction
m_CancelButton->SetFocus(); /* Necessary to use escape key as cancel under wxGRk */
} }
/*! /*!
......
...@@ -121,6 +121,7 @@ public: ...@@ -121,6 +121,7 @@ public:
wxCheckBox* m_IsShowPadFill; wxCheckBox* m_IsShowPadFill;
wxCheckBox* m_IsShowPadNum; wxCheckBox* m_IsShowPadNum;
wxBoxSizer* BottomBoxSizer; wxBoxSizer* BottomBoxSizer;
wxButton* m_CancelButton;
////@end WinEDA_FootprintDisplayOptionsFrame member variables ////@end WinEDA_FootprintDisplayOptionsFrame member variables
WinEDA_BasePcbFrame * m_Parent; WinEDA_BasePcbFrame * m_Parent;
......
This diff is collapsed.
...@@ -185,6 +185,7 @@ void WinEDA_MainFrame::OnSashDrag( wxSashEvent& event ) ...@@ -185,6 +185,7 @@ void WinEDA_MainFrame::OnSashDrag( wxSashEvent& event )
wxLayoutAlgorithm layout; wxLayoutAlgorithm layout;
layout.LayoutFrame( this ); layout.LayoutFrame( this );
event.Skip();
} }
...@@ -214,6 +215,8 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event ) ...@@ -214,6 +215,8 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
layout.LayoutFrame( this ); layout.LayoutFrame( this );
if( m_CommandWin ) if( m_CommandWin )
m_CommandWin->Refresh( TRUE ); m_CommandWin->Refresh( TRUE );
event.Skip();
} }
......
...@@ -163,7 +163,7 @@ void WinEDA_PcbFrame::PrepareLayerIndicator() ...@@ -163,7 +163,7 @@ void WinEDA_PcbFrame::PrepareLayerIndicator()
if( m_HToolBar ) if( m_HToolBar )
{ {
#if wxCHECK_VERSION( 2, 8, 3 ) #if wxCHECK_VERSION( 2, 8, 3 ) & !defined(__WXX11__)
m_HToolBar->SetToolNormalBitmap( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap ); m_HToolBar->SetToolNormalBitmap( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, *LayerPairBitmap );
#else #else
int pos = m_HToolBar->GetToolPos( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR ); int pos = m_HToolBar->GetToolPos( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment