From c16a453e5365afca2e0ee6059bcf753373d5417e Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 5 Apr 2020 10:36:55 +0200 Subject: [PATCH] fix minor wxWidgets alerts and a minor Coverity warning --- eeschema/dialogs/dialog_sch_sheet_props.cpp | 1 + .../dialogs/panel_eeschema_settings_base.cpp | 14 +++++++------- .../dialogs/panel_eeschema_settings_base.fbp | 16 +++++++++------- eeschema/dialogs/panel_eeschema_settings_base.h | 2 +- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/eeschema/dialogs/dialog_sch_sheet_props.cpp b/eeschema/dialogs/dialog_sch_sheet_props.cpp index 12d9cefbd1..38c04a2357 100644 --- a/eeschema/dialogs/dialog_sch_sheet_props.cpp +++ b/eeschema/dialogs/dialog_sch_sheet_props.cpp @@ -46,6 +46,7 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( SCH_EDIT_FRAME* aParent, SCH_SHE { m_sheet = aSheet; m_fields = new FIELDS_GRID_TABLE( this, aParent, m_sheet ); + m_width = 100; // Will be later set to a better value m_delayedFocusRow = SHEETNAME; m_delayedFocusColumn = FDC_VALUE; diff --git a/eeschema/dialogs/panel_eeschema_settings_base.cpp b/eeschema/dialogs/panel_eeschema_settings_base.cpp index 9c4211dba2..3ccaa0153b 100644 --- a/eeschema/dialogs/panel_eeschema_settings_base.cpp +++ b/eeschema/dialogs/panel_eeschema_settings_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -26,13 +26,13 @@ PANEL_EESCHEMA_SETTINGS_BASE::PANEL_EESCHEMA_SETTINGS_BASE( wxWindow* parent, wx m_staticText2 = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("&Measurement units:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); - sbSizer7->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + sbSizer7->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); wxString m_choiceUnitsChoices[] = { _("inches"), _("millimeters") }; int m_choiceUnitsNChoices = sizeof( m_choiceUnitsChoices ) / sizeof( wxString ); m_choiceUnits = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceUnitsNChoices, m_choiceUnitsChoices, 0 ); m_choiceUnits->SetSelection( 0 ); - sbSizer7->Add( m_choiceUnits, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 ); + sbSizer7->Add( m_choiceUnits, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); bLeftColumn->Add( sbSizer7, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 ); @@ -60,10 +60,10 @@ PANEL_EESCHEMA_SETTINGS_BASE::PANEL_EESCHEMA_SETTINGS_BASE( wxWindow* parent, wx m_textSizeLabel = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Schematic text size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeLabel->Wrap( -1 ); - bSizer5->Add( m_textSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + bSizer5->Add( m_textSizeLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_textSizeCtrl = new wxTextCtrl( sbSizer5->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP ); - bSizer5->Add( m_textSizeCtrl, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer5->Add( m_textSizeCtrl, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); m_textSizeUnits = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("mils"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeUnits->Wrap( -1 ); @@ -168,10 +168,10 @@ PANEL_EESCHEMA_SETTINGS_BASE::PANEL_EESCHEMA_SETTINGS_BASE( wxWindow* parent, wx m_labelIncrementLabel = new wxStaticText( repeatSizer->GetStaticBox(), wxID_ANY, _("Label increment:"), wxDefaultPosition, wxDefaultSize, 0 ); m_labelIncrementLabel->Wrap( -1 ); - fgSizerRepeatOpt1->Add( m_labelIncrementLabel, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 ); + fgSizerRepeatOpt1->Add( m_labelIncrementLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); m_spinLabelRepeatStep = new wxSpinCtrl( repeatSizer->GetStaticBox(), wxID_ANY, wxT("1"), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_WRAP, -10, 10, 1 ); - fgSizerRepeatOpt1->Add( m_spinLabelRepeatStep, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 ); + fgSizerRepeatOpt1->Add( m_spinLabelRepeatStep, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); fgSizerRepeatOpt1->Add( 0, 0, 1, wxEXPAND, 3 ); diff --git a/eeschema/dialogs/panel_eeschema_settings_base.fbp b/eeschema/dialogs/panel_eeschema_settings_base.fbp index 0300ca167d..1ed440205e 100644 --- a/eeschema/dialogs/panel_eeschema_settings_base.fbp +++ b/eeschema/dialogs/panel_eeschema_settings_base.fbp @@ -14,6 +14,7 @@ panel_eeschema_settings_base 1000 none + 1 PanelEeschemaSettingsBase @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -77,7 +79,7 @@ none 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -138,8 +140,8 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT - 0 + wxALIGN_CENTER_VERTICAL|wxALL + 1 1 1 @@ -368,7 +370,7 @@ none 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -429,7 +431,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxALL 1 1 @@ -1510,7 +1512,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT 0 1 @@ -1571,7 +1573,7 @@ 5 - wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxBOTTOM|wxALIGN_CENTER_VERTICAL + wxALIGN_CENTER_VERTICAL|wxBOTTOM 1 1 diff --git a/eeschema/dialogs/panel_eeschema_settings_base.h b/eeschema/dialogs/panel_eeschema_settings_base.h index 50967607a4..7f5e0a3968 100644 --- a/eeschema/dialogs/panel_eeschema_settings_base.h +++ b/eeschema/dialogs/panel_eeschema_settings_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version Jul 10 2019) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE!