From 7253ba28dfe40ffdff1a2f679df5e5eb5436affe Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 16 Jul 2016 13:25:07 +0200 Subject: [PATCH] Eeschema: dlg size fixes and osx fixes --- .../dialog_edit_component_in_schematic.cpp | 10 ++++++--- ...dialog_edit_component_in_schematic_fbp.cpp | 4 +++- ...dialog_edit_component_in_schematic_fbp.fbp | 21 ++++++++++++------- .../dialog_edit_component_in_schematic_fbp.h | 3 ++- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 6e8d604b09..d0f7021400 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -126,6 +126,13 @@ private: void showButtonHandler( wxCommandEvent& event ); void OnTestChipName( wxCommandEvent& event ); void OnSelectChipName( wxCommandEvent& event ); + void OnInitDlg( wxInitDialogEvent& event ) + { + TransferDataToWindow(); + + // Now all widgets have the size fixed, call FinishDialogSettings + FinishDialogSettings(); + } SCH_FIELD* findField( const wxString& aFieldName ); @@ -204,9 +211,6 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow stdDialogButtonSizerOK->SetDefault(); FixOSXCancelButtonIssue(); - - // Now all widgets have the size fixed, call FinishDialogSettings - FinishDialogSettings(); } diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp index b4150584fe..6dddb57b88 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 28 2015) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -290,6 +290,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) ); m_buttonTestChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this ); m_buttonSelectChipName->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this ); defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); @@ -307,6 +308,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCloseDialog ) ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnInitDlg ) ); m_buttonTestChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnTestChipName ), NULL, this ); m_buttonSelectChipName->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnSelectChipName ), NULL, this ); defaultsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp index 07addab429..d46b0b57e5 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp @@ -67,7 +67,7 @@ - + OnInitDlg @@ -112,6 +112,7 @@ optionsSizer wxVERTICAL + 1 none @@ -740,6 +741,7 @@ sbSizerChipName wxVERTICAL + 1 none @@ -777,7 +779,7 @@ 0 - + 0 0 @@ -1140,7 +1142,7 @@ 0 - + 0 0 @@ -1377,6 +1379,7 @@ fieldsSizer wxHORIZONTAL + 1 none @@ -1389,6 +1392,7 @@ gridStaticBoxSizer wxVERTICAL + 1 none @@ -1981,6 +1985,7 @@ visibilitySizer wxVERTICAL + 1 none @@ -2380,7 +2385,7 @@ 0 - + 0 0 @@ -2554,7 +2559,7 @@ 0 - + 0 0 @@ -2834,7 +2839,7 @@ 0 - + 0 0 @@ -3091,7 +3096,7 @@ 0 - + 0 0 @@ -3348,7 +3353,7 @@ 0 - + 0 0 diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h index fbfeb50d3b..4e50064713 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Mar 28 2015) +// C++ code generated with wxFormBuilder (version May 21 2016) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -85,6 +85,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); } + virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); } virtual void OnTestChipName( wxCommandEvent& event ) { event.Skip(); } virtual void OnSelectChipName( wxCommandEvent& event ) { event.Skip(); } virtual void SetInitCmp( wxCommandEvent& event ) { event.Skip(); }