Commit a4f2d3ea authored by jean-pierre charras's avatar jean-pierre charras

All: fix a very minor issue: when a window is closed mazimized, and later...

All: fix a very minor issue: when a window is closed mazimized, and later reopened, it was not maximized. But this is very annoying when using 2 monitors with a different size
Very minor other enhancements and fixes
parents 6b39096b 709fe07e
...@@ -113,6 +113,7 @@ void EDA_BASE_FRAME::LoadSettings() ...@@ -113,6 +113,7 @@ void EDA_BASE_FRAME::LoadSettings()
config = wxGetApp().m_EDA_Config; config = wxGetApp().m_EDA_Config;
int maximized = 0;
if( config ) if( config )
{ {
text = m_FrameName + wxT( "Pos_x" ); text = m_FrameName + wxT( "Pos_x" );
...@@ -123,6 +124,8 @@ void EDA_BASE_FRAME::LoadSettings() ...@@ -123,6 +124,8 @@ void EDA_BASE_FRAME::LoadSettings()
config->Read( text, &m_FrameSize.x, 600 ); config->Read( text, &m_FrameSize.x, 600 );
text = m_FrameName + wxT( "Size_y" ); text = m_FrameName + wxT( "Size_y" );
config->Read( text, &m_FrameSize.y, 400 ); config->Read( text, &m_FrameSize.y, 400 );
text = m_FrameName + wxT( "Maximized" );
config->Read( text, &maximized, 0 );
} }
// Ensure Window title bar is visible // Ensure Window title bar is visible
...@@ -135,6 +138,9 @@ void EDA_BASE_FRAME::LoadSettings() ...@@ -135,6 +138,9 @@ void EDA_BASE_FRAME::LoadSettings()
#endif #endif
if( m_FramePos.y < Ypos_min ) if( m_FramePos.y < Ypos_min )
m_FramePos.y = Ypos_min; m_FramePos.y = Ypos_min;
if( maximized )
Maximize();
} }
...@@ -166,6 +172,8 @@ void EDA_BASE_FRAME::SaveSettings() ...@@ -166,6 +172,8 @@ void EDA_BASE_FRAME::SaveSettings()
config->Write( text, (long) m_FrameSize.x ); config->Write( text, (long) m_FrameSize.x );
text = m_FrameName + wxT( "Size_y" ); text = m_FrameName + wxT( "Size_y" );
config->Write( text, (long) m_FrameSize.y ); config->Write( text, (long) m_FrameSize.y );
text = m_FrameName + wxT( "Maximized" );
config->Write( text, IsMaximized() );
} }
......
...@@ -7,8 +7,11 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) : ...@@ -7,8 +7,11 @@ DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
DIALOG_LIB_EDIT_PIN_BASE( parent ) DIALOG_LIB_EDIT_PIN_BASE( parent )
{ {
/* Required to make escape key work correctly in wxGTK. */ /* Required to make escape key work correctly in wxGTK. */
m_textName->SetFocus(); SetFocus();
m_sdbSizer1OK->SetDefault(); // Set tab order
m_textPinName-> MoveAfterInTabOrder(this);
m_textPadName-> MoveAfterInTabOrder(m_textPinName);
m_sdbSizerButtonsOK->SetDefault();
} }
......
...@@ -38,16 +38,16 @@ public: ...@@ -38,16 +38,16 @@ public:
void SetStyle( int style ) { m_choiceStyle->SetSelection( style ); } void SetStyle( int style ) { m_choiceStyle->SetSelection( style ); }
int GetStyle( void ) { return m_choiceStyle->GetSelection(); } int GetStyle( void ) { return m_choiceStyle->GetSelection(); }
void SetName( const wxString& name ) { m_textName->SetValue( name ); } void SetName( const wxString& name ) { m_textPinName->SetValue( name ); }
wxString GetName( void ) { return m_textName->GetValue(); } wxString GetName( void ) { return m_textPinName->GetValue(); }
void SetNameTextSize( const wxString& size ) void SetNameTextSize( const wxString& size )
{ {
m_textNameTextSize->SetValue( size ); m_textPinNameTextSize->SetValue( size );
} }
wxString GetNameTextSize( void ) wxString GetNameTextSize( void )
{ {
return m_textNameTextSize->GetValue(); return m_textPinNameTextSize->GetValue();
} }
void SetNameTextSizeUnits( const wxString& units ) void SetNameTextSizeUnits( const wxString& units )
...@@ -55,22 +55,22 @@ public: ...@@ -55,22 +55,22 @@ public:
m_staticNameTextSizeUnits->SetLabel( units ); m_staticNameTextSizeUnits->SetLabel( units );
} }
void SetNumber( const wxString& number ) void SetPadName( const wxString& number )
{ {
m_textNumber->SetValue( number ); m_textPadName->SetValue( number );
} }
wxString GetNumber( void ) { return m_textNumber->GetValue(); } wxString GetPadName( void ) { return m_textPadName->GetValue(); }
void SetNumberTextSize( const wxString& size ) void SetPadNameTextSize( const wxString& size )
{ {
m_textNumberTextSize->SetValue( size ); m_textPadNameTextSize->SetValue( size );
} }
wxString GetNumberTextSize( void ) wxString GetPadNameTextSize( void )
{ {
return m_textNumberTextSize->GetValue(); return m_textPadNameTextSize->GetValue();
} }
void SetNumberTextSizeUnits( const wxString& units ) void SetPadNameTextSizeUnits( const wxString& units )
{ {
m_staticNumberTextSizeUnits->SetLabel( units ); m_staticNumberTextSizeUnits->SetLabel( units );
} }
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -27,53 +27,53 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -27,53 +27,53 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
fgSizer1->SetFlexibleDirection( wxBOTH ); fgSizer1->SetFlexibleDirection( wxBOTH );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL ); fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Pin &name:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPinName = new wxStaticText( this, wxID_ANY, _("Pin &name:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 ); m_staticTextPinName->Wrap( -1 );
fgSizer1->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_textName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textPinName = new wxTextCtrl( this, ID_M_TEXTPINNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); fgSizer1->Add( m_textPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("N&ame text size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextNameSize = new wxStaticText( this, wxID_ANY, _("N&ame text size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 ); m_staticTextNameSize->Wrap( -1 );
fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_textNameTextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textPinNameTextSize = new wxTextCtrl( this, ID_M_TEXTPINNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_textPinNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticNameTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticNameTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticNameTextSizeUnits->Wrap( -1 ); m_staticNameTextSizeUnits->Wrap( -1 );
fgSizer1->Add( m_staticNameTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticNameTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText4 = new wxStaticText( this, wxID_ANY, _("Pin n&umber:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPadName = new wxStaticText( this, ID_M_STATICTEXTPADNAME, _("Pin n&umber:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText4->Wrap( -1 ); m_staticTextPadName->Wrap( -1 );
m_staticText4->SetToolTip( _("Pin number: 1 to 4 ASCII letters and/or digits") ); m_staticTextPadName->SetToolTip( _("Pin number: 1 to 4 ASCII letters and/or digits") );
fgSizer1->Add( m_staticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextPadName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_textNumber = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textPadName = new wxTextCtrl( this, ID_M_TEXTPADNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textNumber, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 ); fgSizer1->Add( m_textPadName, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3 );
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Number te&xt size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPadNameSize = new wxStaticText( this, wxID_ANY, _("Number te&xt size:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 ); m_staticTextPadNameSize->Wrap( -1 );
fgSizer1->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextPadNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_textNumberTextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textPadNameTextSize = new wxTextCtrl( this, ID_M_TEXTPADNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textNumberTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_textPadNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticNumberTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticNumberTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticNumberTextSizeUnits->Wrap( -1 ); m_staticNumberTextSizeUnits->Wrap( -1 );
fgSizer1->Add( m_staticNumberTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticNumberTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText5 = new wxStaticText( this, wxID_ANY, _("&Orientation:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextOrient = new wxStaticText( this, wxID_ANY, _("&Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText5->Wrap( -1 ); m_staticTextOrient->Wrap( -1 );
fgSizer1->Add( m_staticText5, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextOrient, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_choiceOrientation = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_choiceOrientation = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
fgSizer1->Add( m_choiceOrientation, 0, wxALL, 5 ); fgSizer1->Add( m_choiceOrientation, 0, wxALL, 5 );
...@@ -81,9 +81,9 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -81,9 +81,9 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
fgSizer1->Add( 15, 0, 1, wxEXPAND, 3 ); fgSizer1->Add( 15, 0, 1, wxEXPAND, 3 );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("&Length:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextPinLen = new wxStaticText( this, ID_M_STATICTEXTPINLEN, _("&Length:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 ); m_staticTextPinLen->Wrap( -1 );
fgSizer1->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextPinLen, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_textLength = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_textLength = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizer1->Add( m_textLength, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_textLength, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
...@@ -92,11 +92,11 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -92,11 +92,11 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
m_staticLengthUnits->Wrap( -1 ); m_staticLengthUnits->Wrap( -1 );
fgSizer1->Add( m_staticLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_staticText6 = new wxStaticText( this, wxID_ANY, _("&Electrical type:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextEType = new wxStaticText( this, wxID_ANY, _("&Electrical type:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText6->Wrap( -1 ); m_staticTextEType->Wrap( -1 );
m_staticText6->SetToolTip( _("Used by the ERC.") ); m_staticTextEType->SetToolTip( _("Used by the ERC.") );
fgSizer1->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextEType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_choiceElectricalType = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_choiceElectricalType = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
fgSizer1->Add( m_choiceElectricalType, 0, wxALL, 5 ); fgSizer1->Add( m_choiceElectricalType, 0, wxALL, 5 );
...@@ -113,9 +113,9 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -113,9 +113,9 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
fgSizer1->Add( 0, 0, 0, wxEXPAND, 3 ); fgSizer1->Add( 0, 0, 0, wxEXPAND, 3 );
m_staticText7 = new wxStaticText( this, wxID_ANY, _("Graphic &Style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextGstyle = new wxStaticText( this, wxID_ANY, _("Graphic &Style:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText7->Wrap( -1 ); m_staticTextGstyle->Wrap( -1 );
fgSizer1->Add( m_staticText7, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 ); fgSizer1->Add( m_staticTextGstyle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
m_choiceStyle = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); m_choiceStyle = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
fgSizer1->Add( m_choiceStyle, 0, wxALL, 5 ); fgSizer1->Add( m_choiceStyle, 0, wxALL, 5 );
...@@ -147,13 +147,13 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID ...@@ -147,13 +147,13 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
boarderSizer->Add( 0, 5, 0, wxALL|wxEXPAND, 10 ); boarderSizer->Add( 0, 5, 0, wxALL|wxEXPAND, 10 );
m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizerButtons = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
m_sdbSizer1->Realize(); m_sdbSizerButtons->Realize();
boarderSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 0 ); boarderSizer->Add( m_sdbSizerButtons, 0, wxALL|wxEXPAND, 0 );
mainSizer->Add( boarderSizer, 0, wxALL|wxEXPAND, 12 ); mainSizer->Add( boarderSizer, 0, wxALL|wxEXPAND, 12 );
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -40,31 +40,41 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog ...@@ -40,31 +40,41 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
protected: protected:
wxStaticText* m_staticText1; enum
wxTextCtrl* m_textName; {
ID_M_TEXTPINNAME = 1000,
wxStaticText* m_staticText2; ID_M_TEXTPINNAMETEXTSIZE,
wxTextCtrl* m_textNameTextSize; ID_M_STATICTEXTPADNAME,
ID_M_TEXTPADNAME,
ID_M_TEXTPADNAMETEXTSIZE,
ID_M_STATICTEXTPINLEN,
};
wxStaticText* m_staticTextPinName;
wxTextCtrl* m_textPinName;
wxStaticText* m_staticTextNameSize;
wxTextCtrl* m_textPinNameTextSize;
wxStaticText* m_staticNameTextSizeUnits; wxStaticText* m_staticNameTextSizeUnits;
wxStaticText* m_staticText4; wxStaticText* m_staticTextPadName;
wxTextCtrl* m_textNumber; wxTextCtrl* m_textPadName;
wxStaticText* m_staticText9; wxStaticText* m_staticTextPadNameSize;
wxTextCtrl* m_textNumberTextSize; wxTextCtrl* m_textPadNameTextSize;
wxStaticText* m_staticNumberTextSizeUnits; wxStaticText* m_staticNumberTextSizeUnits;
wxStaticText* m_staticText5; wxStaticText* m_staticTextOrient;
wxBitmapComboBox* m_choiceOrientation; wxBitmapComboBox* m_choiceOrientation;
wxStaticText* m_staticText11; wxStaticText* m_staticTextPinLen;
wxTextCtrl* m_textLength; wxTextCtrl* m_textLength;
wxStaticText* m_staticLengthUnits; wxStaticText* m_staticLengthUnits;
wxStaticText* m_staticText6; wxStaticText* m_staticTextEType;
wxBitmapComboBox* m_choiceElectricalType; wxBitmapComboBox* m_choiceElectricalType;
wxStaticText* m_staticText7; wxStaticText* m_staticTextGstyle;
wxBitmapComboBox* m_choiceStyle; wxBitmapComboBox* m_choiceStyle;
...@@ -73,9 +83,9 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog ...@@ -73,9 +83,9 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
wxCheckBox* m_checkApplyToAllConversions; wxCheckBox* m_checkApplyToAllConversions;
wxCheckBox* m_checkShow; wxCheckBox* m_checkShow;
wxStdDialogButtonSizer* m_sdbSizer1; wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizer1OK; wxButton* m_sdbSizerButtonsOK;
wxButton* m_sdbSizer1Cancel; wxButton* m_sdbSizerButtonsCancel;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCBpartSelection( wxCommandEvent& event ) { event.Skip(); } virtual void OnCBpartSelection( wxCommandEvent& event ) { event.Skip(); }
...@@ -83,7 +93,7 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog ...@@ -83,7 +93,7 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
public: public:
DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_LIB_EDIT_PIN_BASE(); ~DIALOG_LIB_EDIT_PIN_BASE();
}; };
......
...@@ -61,11 +61,11 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) ...@@ -61,11 +61,11 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
pin->m_PinNameSize, pin->m_PinNameSize,
m_InternalUnits ) ); m_InternalUnits ) );
dlg.SetNameTextSizeUnits( units ); dlg.SetNameTextSizeUnits( units );
dlg.SetNumber( pin->GetNumberString() ); dlg.SetPadName( pin->GetNumberString() );
dlg.SetNumberTextSize( ReturnStringFromValue( g_UserUnit, dlg.SetPadNameTextSize( ReturnStringFromValue( g_UserUnit,
pin->m_PinNumSize, pin->m_PinNumSize,
m_InternalUnits ) ); m_InternalUnits ) );
dlg.SetNumberTextSizeUnits( units ); dlg.SetPadNameTextSizeUnits( units );
dlg.SetLength( ReturnStringFromValue( g_UserUnit, pin->GetLength(), m_InternalUnits ) ); dlg.SetLength( ReturnStringFromValue( g_UserUnit, pin->GetLength(), m_InternalUnits ) );
dlg.SetLengthUnits( units ); dlg.SetLengthUnits( units );
dlg.SetAddToAllParts( pin->GetUnit() == 0 ); dlg.SetAddToAllParts( pin->GetUnit() == 0 );
...@@ -94,7 +94,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) ...@@ -94,7 +94,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
/* Save the pin properties to use for the next new pin. */ /* Save the pin properties to use for the next new pin. */
LastPinNameSize = ReturnValueFromString( g_UserUnit, dlg.GetNameTextSize(), m_InternalUnits ); LastPinNameSize = ReturnValueFromString( g_UserUnit, dlg.GetNameTextSize(), m_InternalUnits );
LastPinNumSize = ReturnValueFromString( g_UserUnit, dlg.GetNumberTextSize(), m_InternalUnits ); LastPinNumSize = ReturnValueFromString( g_UserUnit, dlg.GetPadNameTextSize(), m_InternalUnits );
LastPinOrient = LIB_PIN::GetOrientationCode( dlg.GetOrientation() ); LastPinOrient = LIB_PIN::GetOrientationCode( dlg.GetOrientation() );
LastPinLength = ReturnValueFromString( g_UserUnit, dlg.GetLength(), m_InternalUnits ); LastPinLength = ReturnValueFromString( g_UserUnit, dlg.GetLength(), m_InternalUnits );
LastPinShape = LIB_PIN::GetStyleCode( dlg.GetStyle() ); LastPinShape = LIB_PIN::GetStyleCode( dlg.GetStyle() );
...@@ -106,7 +106,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) ...@@ -106,7 +106,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
pin->EnableEditMode( true, g_EditPinByPinIsOn ); pin->EnableEditMode( true, g_EditPinByPinIsOn );
pin->SetName( dlg.GetName() ); pin->SetName( dlg.GetName() );
pin->SetNameTextSize( LastPinNameSize ); pin->SetNameTextSize( LastPinNameSize );
pin->SetNumber( dlg.GetNumber() ); pin->SetNumber( dlg.GetPadName() );
pin->SetNumberTextSize( LastPinNumSize ); pin->SetNumberTextSize( LastPinNumSize );
pin->SetOrientation( LastPinOrient ); pin->SetOrientation( LastPinOrient );
pin->SetLength( LastPinLength ); pin->SetLength( LastPinLength );
......
...@@ -376,6 +376,9 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event ) ...@@ -376,6 +376,9 @@ void SCH_EDIT_FRAME::OnCloseWindow( wxCloseEvent& Event )
if( m_LibeditFrame && !m_LibeditFrame->Close() ) // Can close component editor? if( m_LibeditFrame && !m_LibeditFrame->Close() ) // Can close component editor?
return; return;
if( m_ViewlibFrame && !m_ViewlibFrame->Close() ) // Can close component viewer?
return;
SCH_SHEET_LIST SheetList; SCH_SHEET_LIST SheetList;
if( SheetList.IsModified() ) if( SheetList.IsModified() )
......
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Sep 8 2010) // C++ code generated with wxFormBuilder (version Nov 17 2010)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
...@@ -110,7 +110,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog ...@@ -110,7 +110,7 @@ class DIALOG_DESIGN_RULES_BASE : public wxDialog
public: public:
DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); DIALOG_DESIGN_RULES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Design Rules Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 777,640 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_DESIGN_RULES_BASE(); ~DIALOG_DESIGN_RULES_BASE();
}; };
......
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