From f28d30a87be7fc6e8bd8ef37ae7894458ca19439 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 22 Aug 2020 16:40:56 +0200 Subject: [PATCH] Fix minor wxWidgets alert and a few Coverity warnings. --- common/dialogs/dialog_print_generic_base.cpp | 12 ++++++------ common/dialogs/dialog_print_generic_base.fbp | 6 ++++-- common/dialogs/dialog_print_generic_base.h | 2 +- pcbnew/class_edge_mod.cpp | 2 +- pcbnew/pcbnew_printout.cpp | 3 ++- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/common/dialogs/dialog_print_generic_base.cpp b/common/dialogs/dialog_print_generic_base.cpp index 5750e9ea8d..7815a18d64 100644 --- a/common/dialogs/dialog_print_generic_base.cpp +++ b/common/dialogs/dialog_print_generic_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! @@ -64,19 +64,19 @@ DIALOG_PRINT_GENERIC_BASE::DIALOG_PRINT_GENERIC_BASE( wxWindow* parent, wxWindow m_scaleFit = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Fit to page"), wxDefaultPosition, wxDefaultSize, 0 ); bScaleSizer->Add( m_scaleFit, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bSizerScaleCustom; + bSizerScaleCustom = new wxBoxSizer( wxHORIZONTAL ); m_scaleCustom = new wxRadioButton( bScaleSizer->GetStaticBox(), wxID_ANY, _("Custom:"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer10->Add( m_scaleCustom, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerScaleCustom->Add( m_scaleCustom, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_scaleCustomText = new wxTextCtrl( bScaleSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_scaleCustomText->SetToolTip( _("Set X scale adjust for exact scale plotting") ); - bSizer10->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + bSizerScaleCustom->Add( m_scaleCustomText, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - bScaleSizer->Add( bSizer10, 1, wxEXPAND, 5 ); + bScaleSizer->Add( bSizerScaleCustom, 1, wxEXPAND, 5 ); bOptionsSizer->Add( bScaleSizer, 0, wxALL|wxEXPAND, 5 ); diff --git a/common/dialogs/dialog_print_generic_base.fbp b/common/dialogs/dialog_print_generic_base.fbp index e520b9b0c3..bbc4c9d237 100644 --- a/common/dialogs/dialog_print_generic_base.fbp +++ b/common/dialogs/dialog_print_generic_base.fbp @@ -14,6 +14,7 @@ dialog_print_generic_base 1000 none + 1 DIALOG_PRINT_GENERIC @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -462,7 +464,7 @@ 1 - bSizer10 + bSizerScaleCustom wxHORIZONTAL none @@ -531,7 +533,7 @@ 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 1 1 diff --git a/common/dialogs/dialog_print_generic_base.h b/common/dialogs/dialog_print_generic_base.h index cb4f2f9c4d..843ee3bf01 100644 --- a/common/dialogs/dialog_print_generic_base.h +++ b/common/dialogs/dialog_print_generic_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! diff --git a/pcbnew/class_edge_mod.cpp b/pcbnew/class_edge_mod.cpp index 85fd30687d..2de6da752d 100644 --- a/pcbnew/class_edge_mod.cpp +++ b/pcbnew/class_edge_mod.cpp @@ -183,7 +183,7 @@ void EDGE_MODULE::Flip( const wxPoint& aCentre, bool aFlipLeftRight ) { MIRROR( m_Start.x, aCentre.x ); MIRROR( m_End.x, aCentre.x ); - MIRROR( m_ThirdPoint.y, aCentre.x ); + MIRROR( m_ThirdPoint.x, aCentre.x ); MIRROR( m_BezierC1.x, aCentre.x ); MIRROR( m_BezierC2.x, aCentre.x ); MIRROR( m_Start0.x, pt.x ); diff --git a/pcbnew/pcbnew_printout.cpp b/pcbnew/pcbnew_printout.cpp index 4e57b773cf..97da16960e 100644 --- a/pcbnew/pcbnew_printout.cpp +++ b/pcbnew/pcbnew_printout.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2009 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr - * Copyright (C) 1992-2016 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors. * Copyright (C) 2018 CERN * Author: Maciej Suminski * Author: Tomasz Wlostowski @@ -39,6 +39,7 @@ PCBNEW_PRINTOUT_SETTINGS::PCBNEW_PRINTOUT_SETTINGS( const PAGE_INFO& aPageInfo ) m_drillMarks = SMALL_DRILL_SHAPE; m_pagination = ALL_LAYERS; m_noEdgeLayer = false; + m_asItemCheckboxes = false; }