From efdb67aa6467ebdbf95d81715bb18b5ca4d9d941 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 1 Oct 2022 18:42:02 +0200 Subject: [PATCH] Minor fixes. --- common/swig/kicad.i | 11 ++++++----- .../dialogs/dialog_line_properties_base.cpp | 19 ++++++++++--------- .../dialogs/dialog_line_properties_base.fbp | 13 ++++++++----- .../dialogs/dialog_line_properties_base.h | 9 +++++---- 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/common/swig/kicad.i b/common/swig/kicad.i index d55653e6e7..f44fff10de 100644 --- a/common/swig/kicad.i +++ b/common/swig/kicad.i @@ -109,6 +109,12 @@ principle should be easily implemented by adapting the current STL containers. // SWIG is incompatible with std::unique_ptr %ignore GetNewConfig; +// wrapper of BASE_SEQ (see typedef std::vector BASE_SEQ;) +%template(base_seqVect) std::vector; + +// TODO: wrapper of BASE_SET (see std::bitset BASE_SET;) + + // header files that must be wrapped %include %include macros_swig.h @@ -134,11 +140,6 @@ typedef long time_t; %template(intVector) std::vector; %template(str_utf8_Map) std::map< std::string,UTF8 >; -// wrapper of BASE_SEQ (see typedef std::vector BASE_SEQ;) -%template(base_seqVect) std::vector; - -// TODO: wrapper of BASE_SET (see std::bitset BASE_SET;) - // KiCad plugin handling %include "kicadplugins.i" diff --git a/eeschema/dialogs/dialog_line_properties_base.cpp b/eeschema/dialogs/dialog_line_properties_base.cpp index d25c2b284c..9f8ddddf8a 100644 --- a/eeschema/dialogs/dialog_line_properties_base.cpp +++ b/eeschema/dialogs/dialog_line_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -34,7 +34,7 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi m_lineWidth = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 ); m_lineWidth->SetMinSize( wxSize( 146,-1 ) ); - gbSizer1->Add( m_lineWidth, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->Add( m_lineWidth, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_staticWidthUnits = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticWidthUnits->Wrap( -1 ); @@ -46,18 +46,18 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi m_staticTextColor->Wrap( -1 ); gbSizer1->Add( m_staticTextColor, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 15 ); - m_panel11 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL ); + m_panelColor = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL ); wxBoxSizer* bSizer21; bSizer21 = new wxBoxSizer( wxVERTICAL ); - m_colorSwatch = new COLOR_SWATCH( m_panel11, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_colorSwatch = new COLOR_SWATCH( m_panelColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); bSizer21->Add( m_colorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 ); - m_panel11->SetSizer( bSizer21 ); - m_panel11->Layout(); - bSizer21->Fit( m_panel11 ); - gbSizer1->Add( m_panel11, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_panelColor->SetSizer( bSizer21 ); + m_panelColor->Layout(); + bSizer21->Fit( m_panelColor ); + gbSizer1->Add( m_panelColor, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_staticTextStyle = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextStyle->Wrap( -1 ); @@ -69,6 +69,8 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi gbSizer1->Add( m_typeCombo, wxGBPosition( 1, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + gbSizer1->AddGrowableCol( 1 ); + mainSizer->Add( gbSizer1, 0, wxEXPAND|wxALL, 10 ); wxBoxSizer* bSizer3; @@ -102,7 +104,6 @@ DIALOG_LINE_PROPERTIES_BASE::DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWi this->SetSizer( mainSizer ); this->Layout(); - mainSizer->Fit( this ); this->Centre( wxBOTH ); } diff --git a/eeschema/dialogs/dialog_line_properties_base.fbp b/eeschema/dialogs/dialog_line_properties_base.fbp index f58028c9e0..7c4980e923 100644 --- a/eeschema/dialogs/dialog_line_properties_base.fbp +++ b/eeschema/dialogs/dialog_line_properties_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_line_properties_base 1000 none + 1 dialog_line_properties @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -45,11 +47,12 @@ DIALOG_LINE_PROPERTIES_BASE - -1,-1 + 412,182 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Line Properties + 0 @@ -65,7 +68,7 @@ wxBOTH - + 1 0 @@ -141,7 +144,7 @@ 5 1 1 - wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxEXPAND 0 1 @@ -374,7 +377,7 @@ 0 1 - m_panel11 + m_panelColor 1 diff --git a/eeschema/dialogs/dialog_line_properties_base.h b/eeschema/dialogs/dialog_line_properties_base.h index e3485f774d..9573133b2b 100644 --- a/eeschema/dialogs/dialog_line_properties_base.h +++ b/eeschema/dialogs/dialog_line_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -47,7 +47,7 @@ class DIALOG_LINE_PROPERTIES_BASE : public DIALOG_SHIM wxTextCtrl* m_lineWidth; wxStaticText* m_staticWidthUnits; wxStaticText* m_staticTextColor; - wxPanel* m_panel11; + wxPanel* m_panelColor; COLOR_SWATCH* m_colorSwatch; wxStaticText* m_staticTextStyle; wxBitmapComboBox* m_typeCombo; @@ -59,13 +59,14 @@ class DIALOG_LINE_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_sdbSizerApply; wxButton* m_sdbSizerCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void resetDefaults( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_LINE_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Line Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 412,182 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_LINE_PROPERTIES_BASE(); };