Commit fe6890a9 authored by Wayne Stambaugh's avatar Wayne Stambaugh

Dialog escape key termination and default button fixes.

* Fix about dialog escape key termination bug.
* Fix edit hot keys dialog escape key termination bug.
* Set schematic editor component properties dialog default button.
* Fix schematic editor plot DXF dialog escape key termination bug.
* Set PCB editor layers setup dialog default button.
* Set PCB editor swap layers dialog default button.
* Set PCB editor net list dialog default button.
* Add comment to UIPolicy.txt about escape key termination requiring proper
  dialog button IDs.
parent 283cfa67
...@@ -14,7 +14,11 @@ Dialogs: ...@@ -14,7 +14,11 @@ Dialogs:
Follow the recommendations here: Follow the recommendations here:
http://library.gnome.org/devel/hig-book/2.20/windows-dialog.html.en http://library.gnome.org/devel/hig-book/2.20/windows-dialog.html.en
paying particular attention to "initial focus", "sensible default values", paying particular attention to "initial focus", "sensible default values",
"default buttons", ESC key termination. "default buttons", ESC key termination. Please note that the escape key
termination only works properly if there is a dialog button defined with
an ID of wxID_CANCEL or SetEscapeID( MY_ESCAPE_BUTTON_ID ) is called during
dialog initialization. The former is the preferred method for handling
escape key dialog termination.
Use wxWidgets "sizers" in all dialogs, no matter how simple they are: Use wxWidgets "sizers" in all dialogs, no matter how simple they are:
http://zetcode.com/tutorials/wxwidgetstutorial/layoutmanagement http://zetcode.com/tutorials/wxwidgetstutorial/layoutmanagement
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 12 2010) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -63,7 +63,7 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS ...@@ -63,7 +63,7 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS
bSizer1->Add( m_auiNotebook, 2, wxEXPAND | wxALL, 5 ); bSizer1->Add( m_auiNotebook, 2, wxEXPAND | wxALL, 5 );
m_buttonOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOK = new wxButton( this, wxID_CANCEL, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
m_buttonOK->SetDefault(); m_buttonOK->SetDefault();
bSizer1->Add( m_buttonOK, 0, wxALIGN_CENTER|wxALL, 5 ); bSizer1->Add( m_buttonOK, 0, wxALIGN_CENTER|wxALL, 5 );
......
...@@ -535,7 +535,7 @@ ...@@ -535,7 +535,7 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_CANCEL</property>
<property name="label">OK</property> <property name="label">OK</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 12 2010) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -49,7 +49,7 @@ HOTKEYS_EDITOR_DIALOG_BASE::HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWind ...@@ -49,7 +49,7 @@ HOTKEYS_EDITOR_DIALOG_BASE::HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWind
m_OKButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_OKButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_OKButton, 0, wxALL|wxEXPAND, 5 ); b_buttonsSizer->Add( m_OKButton, 0, wxALL|wxEXPAND, 5 );
m_cancelButton = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_cancelButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
b_buttonsSizer->Add( m_cancelButton, 0, wxALL|wxEXPAND, 5 ); b_buttonsSizer->Add( m_cancelButton, 0, wxALL|wxEXPAND, 5 );
m_undoButton = new wxButton( this, wxID_CANCEL, _("Undo"), wxDefaultPosition, wxDefaultSize, 0 ); m_undoButton = new wxButton( this, wxID_CANCEL, _("Undo"), wxDefaultPosition, wxDefaultSize, 0 );
...@@ -78,4 +78,5 @@ HOTKEYS_EDITOR_DIALOG_BASE::~HOTKEYS_EDITOR_DIALOG_BASE() ...@@ -78,4 +78,5 @@ HOTKEYS_EDITOR_DIALOG_BASE::~HOTKEYS_EDITOR_DIALOG_BASE()
m_OKButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::OnOKClicked ), NULL, this ); m_OKButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::OnOKClicked ), NULL, this );
m_cancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::CancelClicked ), NULL, this ); m_cancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::CancelClicked ), NULL, this );
m_undoButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::UndoClicked ), NULL, this ); m_undoButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::UndoClicked ), NULL, this );
} }
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -37,15 +37,16 @@ class HOTKEYS_EDITOR_DIALOG_BASE : public wxDialog ...@@ -37,15 +37,16 @@ class HOTKEYS_EDITOR_DIALOG_BASE : public wxDialog
wxButton* m_undoButton; wxButton* m_undoButton;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnKeyPressed( wxKeyEvent& event ){ event.Skip(); } virtual void OnKeyPressed( wxKeyEvent& event ) { event.Skip(); }
virtual void OnRightClickOnCell( wxGridEvent& event ){ event.Skip(); } virtual void OnRightClickOnCell( wxGridEvent& event ) { event.Skip(); }
virtual void OnClickOnCell( wxGridEvent& event ){ event.Skip(); } virtual void OnClickOnCell( wxGridEvent& event ) { event.Skip(); }
virtual void OnOKClicked( wxCommandEvent& event ){ event.Skip(); } virtual void OnOKClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void CancelClicked( wxCommandEvent& event ){ event.Skip(); } virtual void CancelClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void UndoClicked( wxCommandEvent& event ){ event.Skip(); } virtual void UndoClicked( wxCommandEvent& event ) { event.Skip(); }
public: public:
HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hotkeys Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 304,235 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hotkeys Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 304,235 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~HOTKEYS_EDITOR_DIALOG_BASE(); ~HOTKEYS_EDITOR_DIALOG_BASE();
......
...@@ -109,6 +109,8 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow ...@@ -109,6 +109,8 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow
{ {
GetSizer()->SetSizeHints( this ); GetSizer()->SetSizeHints( this );
} }
stdDialogButtonSizerOK->SetDefault();
} }
......
...@@ -49,7 +49,7 @@ DIALOG_PLOT_SCHEMATIC_DXF_BASE::DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent ...@@ -49,7 +49,7 @@ DIALOG_PLOT_SCHEMATIC_DXF_BASE::DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent
m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
bupperSizer->Add( bbuttonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); bupperSizer->Add( bbuttonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<property name="size">387,365</property> <property name="size">387,365</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">EESchema Plot DXF</property> <property name="title">Plot DXF</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
...@@ -376,7 +376,7 @@ ...@@ -376,7 +376,7 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_CANCEL</property>
<property name="label">Close</property> <property name="label">Close</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
......
...@@ -52,7 +52,7 @@ class DIALOG_PLOT_SCHEMATIC_DXF_BASE : public wxDialog ...@@ -52,7 +52,7 @@ class DIALOG_PLOT_SCHEMATIC_DXF_BASE : public wxDialog
public: public:
DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot DXF"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot DXF"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_DXF_BASE(); ~DIALOG_PLOT_SCHEMATIC_DXF_BASE();
}; };
......
...@@ -96,7 +96,7 @@ DIALOG_PLOT_SCHEMATIC_HPGL_BASE::DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* pare ...@@ -96,7 +96,7 @@ DIALOG_PLOT_SCHEMATIC_HPGL_BASE::DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* pare
m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 );
m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 );
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<property name="size">387,408</property> <property name="size">387,408</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">EESchema Plot HPGL</property> <property name="title">Plot HPGL</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
...@@ -985,7 +985,7 @@ ...@@ -985,7 +985,7 @@
<property name="fg"></property> <property name="fg"></property>
<property name="font"></property> <property name="font"></property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_CANCEL</property>
<property name="label">Close</property> <property name="label">Close</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
......
...@@ -67,7 +67,7 @@ class DIALOG_PLOT_SCHEMATIC_HPGL_BASE : public wxDialog ...@@ -67,7 +67,7 @@ class DIALOG_PLOT_SCHEMATIC_HPGL_BASE : public wxDialog
public: public:
DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot HPGL"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,408 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot HPGL"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,408 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_HPGL_BASE(); ~DIALOG_PLOT_SCHEMATIC_HPGL_BASE();
}; };
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<property name="size">387,365</property> <property name="size">387,365</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title">EESchema Plot PS</property> <property name="title">Plot Postsript</property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property> <property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property> <property name="validator_style">wxFILTER_NONE</property>
......
...@@ -55,7 +55,7 @@ class DIALOG_PLOT_SCHEMATIC_PS_BASE : public wxDialog ...@@ -55,7 +55,7 @@ class DIALOG_PLOT_SCHEMATIC_PS_BASE : public wxDialog
public: public:
DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot PS"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot Postsript"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_PLOT_SCHEMATIC_PS_BASE(); ~DIALOG_PLOT_SCHEMATIC_PS_BASE();
}; };
......
...@@ -310,6 +310,7 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) : ...@@ -310,6 +310,7 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) :
Center(); Center();
m_sdbSizer2OK->SetFocus(); m_sdbSizer2OK->SetFocus();
m_sdbSizer2OK->SetDefault();
} }
......
This diff is collapsed.
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008) // C++ code generated with wxFormBuilder (version Sep 8 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_netlist_fbp__ #ifndef __dialog_netlist_fbp__
#define __dialog_netlist_fbp__ #define __dialog_netlist_fbp__
#include <wx/intl.h> #include <wx/intl.h>
#include <wx/string.h> #include <wx/string.h>
#include <wx/radiobox.h> #include <wx/radiobox.h>
#include <wx/gdicmn.h> #include <wx/gdicmn.h>
#include <wx/font.h> #include <wx/font.h>
#include <wx/colour.h> #include <wx/colour.h>
#include <wx/settings.h> #include <wx/settings.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/textctrl.h> #include <wx/textctrl.h>
#include <wx/dialog.h> #include <wx/dialog.h>
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_NETLIST_FBP /// Class DIALOG_NETLIST_FBP
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_NETLIST_FBP : public wxDialog class DIALOG_NETLIST_FBP : public wxDialog
{ {
private: private:
protected: protected:
enum enum
{ {
ID_OPEN_NELIST = 1000, ID_OPEN_NELIST = 1000,
ID_READ_NETLIST_FILE, ID_READ_NETLIST_FILE,
ID_TEST_NETLIST, ID_TEST_NETLIST,
ID_COMPILE_RATSNEST, ID_COMPILE_RATSNEST,
}; };
wxRadioBox* m_Select_By_Timestamp; wxRadioBox* m_Select_By_Timestamp;
wxRadioBox* m_ChangeExistingFootprintCtrl; wxRadioBox* m_ChangeExistingFootprintCtrl;
wxRadioBox* m_DeleteBadTracks; wxRadioBox* m_DeleteBadTracks;
wxRadioBox* m_RemoveExtraFootprintsCtrl; wxRadioBox* m_RemoveExtraFootprintsCtrl;
wxButton* m_button1; wxButton* m_button1;
wxButton* m_button2; wxButton* m_button2;
wxButton* m_button3; wxButton* m_button3;
wxButton* m_button4; wxButton* m_button4;
wxButton* m_button5; wxButton* m_button5;
wxStaticLine* m_staticline1; wxStaticLine* m_staticline1;
wxStaticText* m_staticTextNetfilename; wxStaticText* m_staticTextNetfilename;
wxTextCtrl* m_NetlistFilenameCtrl; wxTextCtrl* m_NetlistFilenameCtrl;
wxStaticText* m_staticText1; wxStaticText* m_staticText1;
wxTextCtrl* m_MessageWindow; wxTextCtrl* m_MessageWindow;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnOpenNelistClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnOpenNelistClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnReadNetlistFileClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnReadNetlistFileClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnTestFootprintsClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnTestFootprintsClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCompileRatsnestClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
public: public:
DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist Dialog"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_NETLIST_FBP(); DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_NETLIST_FBP();
};
};
#endif //__dialog_netlist_fbp__
#endif //__dialog_netlist_fbp__
...@@ -106,9 +106,9 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, ...@@ -106,9 +106,9 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent,
/* Build the layer list */ /* Build the layer list */
LayerCount = 0; LayerCount = 0;
int Masque_Layer = int Masque_Layer = g_TabAllCopperLayerMask[board->GetCopperLayerCount() - 1];
g_TabAllCopperLayerMask[board->GetCopperLayerCount() - 1];
Masque_Layer += ALL_NO_CU_LAYERS; Masque_Layer += ALL_NO_CU_LAYERS;
for( ii = 0; ii < NB_LAYERS; ii++ ) for( ii = 0; ii < NB_LAYERS; ii++ )
{ {
m_LayerId[ii] = 0; m_LayerId[ii] = 0;
...@@ -122,6 +122,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, ...@@ -122,6 +122,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent,
break; break;
LayerList[LayerCount] = board->GetLayerName( ii ); LayerList[LayerCount] = board->GetLayerName( ii );
if( ii == default_layer ) if( ii == default_layer )
LayerSelect = LayerCount; LayerSelect = LayerCount;
...@@ -134,6 +135,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, ...@@ -134,6 +135,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent,
if( null_layer ) if( null_layer )
{ {
LayerList[LayerCount] = _( "(Deselect)" ); LayerList[LayerCount] = _( "(Deselect)" );
if( NB_LAYERS == default_layer ) if( NB_LAYERS == default_layer )
LayerSelect = LayerCount; LayerSelect = LayerCount;
...@@ -157,6 +159,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, ...@@ -157,6 +159,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent,
FrameBoxSizer->Add( ButtonBoxSizer, 0, wxALIGN_BOTTOM | wxALL, 0 ); FrameBoxSizer->Add( ButtonBoxSizer, 0, wxALIGN_BOTTOM | wxALL, 0 );
Button = new wxButton( this, wxID_OK, _( "OK" ) ); Button = new wxButton( this, wxID_OK, _( "OK" ) );
Button->SetDefault();
ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 ); ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 );
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) ); Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) );
......
...@@ -254,6 +254,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( PCB_BASE_FRAME* parent ) : ...@@ -254,6 +254,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( PCB_BASE_FRAME* parent ) :
Button = new wxButton( this, wxID_OK, _( "&OK" ), wxDefaultPosition, Button = new wxButton( this, wxID_OK, _( "&OK" ), wxDefaultPosition,
wxDefaultSize, 0 ); wxDefaultSize, 0 );
Button->SetDefault();
StdDialogButtonSizer->AddButton( Button ); StdDialogButtonSizer->AddButton( Button );
Button = new wxButton( this, wxID_CANCEL, _( "&Cancel" ), Button = new wxButton( this, wxID_CANCEL, _( "&Cancel" ),
......
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