diff --git a/3d-viewer/3d_canvas.cpp b/3d-viewer/3d_canvas.cpp
index 024b2da5fe..682e7dd483 100644
--- a/3d-viewer/3d_canvas.cpp
+++ b/3d-viewer/3d_canvas.cpp
@@ -493,11 +493,11 @@ void Pcb3D_GLCanvas::OnPaint( wxPaintEvent& 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
wxGLCanvas::OnSize( event );
- // set GL viewport (not called by wxGLCanvas::OnSize on all platforms...)
- int w, h;
GetClientSize( &w, &h );
#ifndef __WXMOTIF__
if( GetContext() )
@@ -506,6 +506,8 @@ void Pcb3D_GLCanvas::OnSize( wxSizeEvent& event )
SetCurrent();
glViewport( 0, 0, (GLint) w, (GLint) h );
}
+
+ event.Skip();
}
diff --git a/3d-viewer/3d_draw.cpp b/3d-viewer/3d_draw.cpp
index c54ae69660..4502227239 100644
--- a/3d-viewer/3d_draw.cpp
+++ b/3d-viewer/3d_draw.cpp
@@ -75,9 +75,7 @@ void Pcb3D_GLCanvas::Redraw( bool finish )
glCallList( m_gllist );
else
{
- m_gllist = CreateDrawGL_List();
-
-// m_gllist = DisplayCubeforTest(); // Only for test
+ CreateDrawGL_List();
}
glFlush();
@@ -93,7 +91,6 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
/* Create the draw list items
*/
{
- GLuint gllist = glGenLists( 1 );
WinEDA_BasePcbFrame* pcbframe = m_Parent->m_Parent;
BOARD* pcb = pcbframe->m_Pcb;
TRACK* pt_piste;
@@ -101,6 +98,8 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
wxBusyCursor dummy;
+ m_gllist = glGenLists( 1 );
+
pcb->ComputeBoundaryBox();
g_Parm_3D_Visu.m_BoardSettings = pcb->m_BoardSettings;
g_Parm_3D_Visu.m_BoardSize = pcb->m_BoundaryBox.GetSize();
@@ -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[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 );
@@ -223,7 +222,7 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
GLenum err = glGetError();
if( err != GL_NO_ERROR )
DisplayError( this, wxT( "Error in GL commands" ) );
- return gllist;
+ return m_gllist;
}
diff --git a/3d-viewer/3d_frame.cpp b/3d-viewer/3d_frame.cpp
index ed906faf3a..fe1ad3b819 100644
--- a/3d-viewer/3d_frame.cpp
+++ b/3d-viewer/3d_frame.cpp
@@ -309,6 +309,7 @@ void WinEDA3D_DrawFrame::NewDisplay()
/*****************************************/
{
m_Canvas->ClearLists();
+ m_Canvas->CreateDrawGL_List();
m_Canvas->InitGL();
m_Canvas->DisplayStatus();
m_Canvas->Refresh( true );
diff --git a/cvpcb/dialog_display_options.cpp b/cvpcb/dialog_display_options.cpp
index c89441b8d6..3cbf141ceb 100644
--- a/cvpcb/dialog_display_options.cpp
+++ b/cvpcb/dialog_display_options.cpp
@@ -108,6 +108,7 @@ bool WinEDA_FootprintDisplayOptionsFrame::Create( wxWindow* parent, wxWindowID i
m_IsShowPadFill = NULL;
m_IsShowPadNum = NULL;
BottomBoxSizer = NULL;
+ m_CancelButton = NULL;
////@end WinEDA_FootprintDisplayOptionsFrame member initialisation
////@begin WinEDA_FootprintDisplayOptionsFrame creation
@@ -133,7 +134,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
SetFont(*g_DialogFont);
////@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;
@@ -168,7 +169,7 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_IsShowPadNum = new wxCheckBox( itemDialog1, PADNUM_OPT, _("Display Pad &Num"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );
m_IsShowPadNum->SetValue(false);
- if (ShowToolTips())
+ if (WinEDA_FootprintDisplayOptionsFrame::ShowToolTips())
m_IsShowPadNum->SetToolTip(_("Display pad number"));
ColumnBoxSizer->Add(m_IsShowPadNum, 1, wxGROW|wxALL, 5);
@@ -188,9 +189,9 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
itemButton13->SetForegroundColour(wxColour(255, 0, 0));
BottomBoxSizer->Add(itemButton13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
- wxButton* itemButton14 = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
- itemButton14->SetForegroundColour(wxColour(0, 0, 255));
- BottomBoxSizer->Add(itemButton14, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+ m_CancelButton = new wxButton( itemDialog1, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_CancelButton->SetForegroundColour(wxColour(0, 0, 255));
+ BottomBoxSizer->Add(m_CancelButton, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
wxButton* itemButton15 = new wxButton( itemDialog1, wxID_APPLY, _("&Apply"), wxDefaultPosition, wxDefaultSize, 0 );
BottomBoxSizer->Add(itemButton15, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
@@ -201,6 +202,8 @@ void WinEDA_FootprintDisplayOptionsFrame::CreateControls()
m_IsShowPadFill->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadFill) );
m_IsShowPadNum->SetValidator( wxGenericValidator(& DisplayOpt.DisplayPadNum) );
////@end WinEDA_FootprintDisplayOptionsFrame content construction
+
+ m_CancelButton->SetFocus(); /* Necessary to use escape key as cancel under wxGRk */
}
/*!
diff --git a/cvpcb/dialog_display_options.h b/cvpcb/dialog_display_options.h
index 4d278014b0..0544d56078 100644
--- a/cvpcb/dialog_display_options.h
+++ b/cvpcb/dialog_display_options.h
@@ -121,6 +121,7 @@ public:
wxCheckBox* m_IsShowPadFill;
wxCheckBox* m_IsShowPadNum;
wxBoxSizer* BottomBoxSizer;
+ wxButton* m_CancelButton;
////@end WinEDA_FootprintDisplayOptionsFrame member variables
WinEDA_BasePcbFrame * m_Parent;
diff --git a/cvpcb/dialog_display_options.pjd b/cvpcb/dialog_display_options.pjd
index 976f8614e9..c4db3764a6 100644
--- a/cvpcb/dialog_display_options.pjd
+++ b/cvpcb/dialog_display_options.pjd
@@ -10,8 +10,10 @@
0
0
0
+ 1
1
1
+ 1
0
"jean-pierre Charras"
"License GNU"
@@ -106,10 +108,12 @@
0
0
1
+ 0
1
1
0
1
+ 0
@@ -132,6 +136,7 @@
0
""
1
+ 0
""
"Debug"
"ANSI"
@@ -173,6 +178,8 @@
"%AUTO%"
"%AUTO%"
"%AUTO%"
+ 0
+ 1
@@ -213,6 +220,7 @@
0
""
0
+ 0
"ID_DIALOG"
10000
"WinEDA_FootprintDisplayOptionsFrame"
@@ -233,10 +241,16 @@
0
1
"<Any platform>"
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ "Tiled"
1
0
0
- 0
0
0
0
@@ -322,6 +336,7 @@
"wbRadioBoxProxy"
"EDGE_SELECT"
10001
+ ""
"wxRadioBox"
"wxRadioBox"
1
@@ -343,6 +358,11 @@
"<Any platform>"
"DisplayOpt.DisplayModEdge"
"wxGenericValidator(& %VARIABLE%)"
+ ""
+ ""
+ ""
+ ""
+ ""
0
1
0
@@ -380,6 +400,7 @@
"wbRadioBoxProxy"
"TEXT_SELECT"
10002
+ ""
"wxRadioBox"
"wxRadioBox"
1
@@ -401,6 +422,11 @@
"<Any platform>"
"DisplayOpt.DisplayModText"
"wxGenericValidator(& %VARIABLE%)"
+ ""
+ ""
+ ""
+ ""
+ ""
0
1
0
@@ -463,6 +489,7 @@
"wbCheckBoxProxy"
"PADFILL_OPT"
10003
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -476,6 +503,11 @@
""
"DisplayOpt.DisplayPadFill"
"wxGenericValidator(& %VARIABLE%)"
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -521,6 +553,7 @@
"wbCheckBoxProxy"
"PADNUM_OPT"
10004
+ ""
"wxCheckBox"
"wxCheckBox"
1
@@ -534,6 +567,11 @@
"Display pad number"
"DisplayOpt.DisplayPadNum"
"wxGenericValidator(& %VARIABLE%)"
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -606,6 +644,7 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnSaveConfigClick|||"
"ID_SAVE_CONFIG"
10005
+ ""
"wxButton"
"wxButton"
1
@@ -617,6 +656,13 @@
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
@@ -666,6 +712,7 @@
"wbStaticLineProxy"
"ID_STATICLINE1"
10006
+ ""
"wxStaticLine"
"wxStaticLine"
1
@@ -746,6 +793,7 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnOkClick|NONE||"
"wxID_OK"
5100
+ ""
"wxButton"
"wxButton"
1
@@ -757,6 +805,13 @@
1
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
"FF0000"
""
@@ -802,20 +857,28 @@
0
"24/10/2007"
"wbButtonProxy"
- "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||"
+ "wxEVT_COMMAND_BUTTON_CLICKED|OnCancelClick|NONE||WinEDA_FootprintDisplayOptionsFrame"
"wxID_CANCEL"
5101
+ ""
"wxButton"
"wxButton"
1
0
""
""
- ""
+ "m_CancelButton"
"&Cancel"
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
"0000FF"
""
@@ -864,6 +927,7 @@
"wxEVT_COMMAND_BUTTON_CLICKED|OnApplyClick|NONE||"
"wxID_APPLY"
5102
+ ""
"wxButton"
"wxButton"
1
@@ -875,6 +939,13 @@
0
""
""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
+ ""
""
""
""
diff --git a/kicad/mainframe.cpp b/kicad/mainframe.cpp
index c16bcb78db..ef87e78a2d 100644
--- a/kicad/mainframe.cpp
+++ b/kicad/mainframe.cpp
@@ -185,6 +185,7 @@ void WinEDA_MainFrame::OnSashDrag( wxSashEvent& event )
wxLayoutAlgorithm layout;
layout.LayoutFrame( this );
+ event.Skip();
}
@@ -214,6 +215,8 @@ void WinEDA_MainFrame::OnSize( wxSizeEvent& event )
layout.LayoutFrame( this );
if( m_CommandWin )
m_CommandWin->Refresh( TRUE );
+
+ event.Skip();
}
diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp
index 3ae8c3eda1..b383f68107 100644
--- a/pcbnew/tool_pcb.cpp
+++ b/pcbnew/tool_pcb.cpp
@@ -163,7 +163,7 @@ void WinEDA_PcbFrame::PrepareLayerIndicator()
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 );
#else
int pos = m_HToolBar->GetToolPos( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR );