diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index d5d00d98ab..ffef6fe10d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -264,7 +264,6 @@ set( EESCHEMA_SRCS tools/symbol_editor_edit_tool.cpp tools/symbol_editor_move_tool.cpp tools/symbol_editor_pin_tool.cpp - tools/reannotate.cpp tools/sch_drawing_tools.cpp tools/sch_edit_tool.cpp tools/sch_editor_control.cpp diff --git a/eeschema/cross-probing.cpp b/eeschema/cross-probing.cpp index 52448aff16..0b36e9143c 100644 --- a/eeschema/cross-probing.cpp +++ b/eeschema/cross-probing.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include @@ -698,11 +697,6 @@ void SCH_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) m_toolManager->RunAction( ACTIONS::updateSchematicFromPcb, true ); break; - case MAIL_REANNOTATE: - // Reannotate the schematic as per the netlist. - ReannotateFromPCBNew( this, payload ); - break; - default:; } diff --git a/eeschema/tools/reannotate.cpp b/eeschema/tools/reannotate.cpp deleted file mode 100644 index 2818d8504b..0000000000 --- a/eeschema/tools/reannotate.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2020 Brian Piccioni brian@documenteddesigns.com - * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include -#include - - -WX_STRING_REPORTER_FILTERED::WX_STRING_REPORTER_FILTERED( SEVERITY aSeverity ) : - m_MinSeverity( aSeverity ) -{ - -} - - -WX_STRING_REPORTER_FILTERED::~WX_STRING_REPORTER_FILTERED() -{ -} - - -REPORTER& WX_STRING_REPORTER_FILTERED::Report( const wxString &aText, SEVERITY aSeverity ) -{ - if ( aSeverity < m_MinSeverity ) - return *this; - - m_string << aText << "\n"; - return *this; -} - - -bool WX_STRING_REPORTER_FILTERED::HasMessage() const -{ - return !m_string.IsEmpty(); -} - - -void ReannotateFromPCBNew( SCH_EDIT_FRAME* aFrame, std::string& aNetlist ) -{ - wxString annotateerrors; - WX_STRING_REPORTER_FILTERED reporter( SEVERITY::RPT_SEVERITY_ERROR ); - - BACK_ANNOTATE backAnno( aFrame, - reporter, - false, // aRelinkFootprints - false, // aProcessFootprints - false, // aProcessValues - true, // aProcessReferences - false, // aProcessNetNames - false ); // aDryRun - - // TODO (WS): This is completely broken. BackAnnotate symbols never fails so the attempt - // to pass information back through the Kiway payload to Pcbnew never happens. - // Attempting to pass information back through the Kiway payload in and of - // itself is broken because Kiway payloads were never intended to be bidirectional. - if( !backAnno.BackAnnotateSymbols( aNetlist ) ) - { - aNetlist = _( "Errors reported by Eeschema:\n" ) + reporter.m_string.ToStdString(); - aNetlist += _( "\nAnnotation not performed!\n" ); // Assume the worst - } - else - { - aNetlist.clear(); //Empty means good - } - - aFrame->GetCurrentSheet().UpdateAllScreenReferences(); - aFrame->SetSheetNumberAndCount(); - aFrame->SyncView(); - aFrame->OnModify(); - aFrame->GetCanvas()->Refresh(); -} diff --git a/eeschema/tools/reannotate.h b/eeschema/tools/reannotate.h deleted file mode 100644 index ea0ba9d7c1..0000000000 --- a/eeschema/tools/reannotate.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This program source code file is part of KiCad, a free EDA CAD application. - * - * Copyright (C) 2020 Brian Piccioni brian@documenteddesigns.com - * Copyright (C) 2004-2021 KiCad Developers, see AUTHORS.txt for contributors. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, you may find one here: - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * or you may search the http://www.gnu.org website for the version 2 license, - * or you may write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef EESCHEMA_TOOLS_REANNOTATE_H_ -#define EESCHEMA_TOOLS_REANNOTATE_H_ - -#include -/** - * A wrapper for reporting to a wxString object. - */ -class WX_STRING_REPORTER_FILTERED : public REPORTER -{ - SEVERITY m_MinSeverity; - -public: - WX_STRING_REPORTER_FILTERED( SEVERITY aSeverity ); - virtual ~WX_STRING_REPORTER_FILTERED(); - - REPORTER& Report( const wxString& aText, SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED ) override; - wxString m_string = ""; - bool HasMessage() const override; -}; - -///< Backannotate the schematic with a netlist sent from Pcbnew. -///< Reply with a string consisting of errors or warnings. If empty no errors -void ReannotateFromPCBNew( SCH_EDIT_FRAME* aFrame, std::string& aNetlist ); - -#endif /* EESCHEMA_TOOLS_REANNOTATE_H_ */ diff --git a/include/mail_type.h b/include/mail_type.h index f246e3b16e..a96a3029eb 100644 --- a/include/mail_type.h +++ b/include/mail_type.h @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014 CERN - * Copyright (C) 1992-2020 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 1992-2021 KiCad Developers, see CHANGELOG.TXT for contributors. * @author Maciej Suminski * * This program is free software; you can redistribute it and/or @@ -49,7 +49,6 @@ enum MAIL_T MAIL_SCH_REFRESH, // Tell the schematic editor to refresh the display. MAIL_SCH_CLEAN_NETCLASSES, // Tell the schematic editor to clean stale nets out of // the netclass membership lists - MAIL_REANNOTATE, // Reannotate eeSchema MAIL_LIB_EDIT, MAIL_FP_EDIT }; diff --git a/pcbnew/dialogs/dialog_board_reannotate.cpp b/pcbnew/dialogs/dialog_board_reannotate.cpp index c1481ce426..1019fef80a 100644 --- a/pcbnew/dialogs/dialog_board_reannotate.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate.cpp @@ -106,14 +106,6 @@ DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame ) m_frame = aParentFrame; m_screen = m_frame->GetScreen(); - m_standalone = !m_frame->TestStandalone(); // Do this here forces the menu on top - - // Only update the schematic if not in standalone mode. - if( m_standalone ) - { - m_UpdateSchematic->Enable( false ); - m_UpdateSchematic->SetValue( false ); - } m_FrontRefDesStart->SetValidator( wxTextValidator( wxFILTER_DIGITS ) ); m_BackRefDesStart->SetValidator( wxTextValidator( wxFILTER_DIGITS ) ); @@ -179,7 +171,6 @@ DIALOG_BOARD_REANNOTATE::~DIALOG_BOARD_REANNOTATE() cfg->m_Reannotate.sort_on_fp_location = m_locationChoice->GetSelection() == 0; cfg->m_Reannotate.remove_front_prefix = m_RemoveFrontPrefix->GetValue(); cfg->m_Reannotate.remove_back_prefix = m_RemoveBackPrefix->GetValue(); - cfg->m_Reannotate.update_schematic = m_UpdateSchematic->GetValue(); cfg->m_Reannotate.exclude_locked = m_ExcludeLocked->GetValue(); cfg->m_Reannotate.grid_index = m_gridIndex; @@ -202,7 +193,6 @@ void DIALOG_BOARD_REANNOTATE::InitValues( void ) m_locationChoice->SetSelection( cfg->m_Reannotate.sort_on_fp_location ? 0 : 1 ); m_RemoveFrontPrefix->SetValue( cfg->m_Reannotate.remove_front_prefix ); m_RemoveBackPrefix->SetValue( cfg->m_Reannotate.remove_back_prefix ); - m_UpdateSchematic->SetValue( cfg->m_Reannotate.update_schematic ); m_ExcludeLocked->SetValue( cfg->m_Reannotate.exclude_locked ); m_gridIndex = cfg->m_Reannotate.grid_index ; @@ -358,11 +348,6 @@ void DIALOG_BOARD_REANNOTATE::MakeSampleText( wxString& aMessage ) MessageTextFromValue( m_units, m_sortGridx ), MessageTextFromValue( m_units, m_sortGridy ) ); - if( m_UpdateSchematic->GetValue() ) - aMessage += _( "\nThe schematic will be updated." ); - else - aMessage += _( "\nThe schematic will not be updated." ); - ShowReport( aMessage, RPT_SEVERITY_INFO ); } @@ -552,7 +537,7 @@ void DIALOG_BOARD_REANNOTATE::LogFootprints( const wxString& aMessage, for( const RefDesInfo& mod : aFootprints ) { - message += wxString::Format( _( "\n%d %s Uuid: [%s], X, Y: %s, Rounded X, Y, %s" ), + message += wxString::Format( _( "\n%d %s UUID: [%s], X, Y: %s, Rounded X, Y, %s" ), i++, mod.RefDesString, mod.Uuid.AsString(), @@ -567,7 +552,6 @@ void DIALOG_BOARD_REANNOTATE::LogFootprints( const wxString& aMessage, bool DIALOG_BOARD_REANNOTATE::ReannotateBoard() { - std::string payload; std::vector BadRefDes; wxString message, badrefdes; STRING_FORMATTER stringformatter; @@ -585,7 +569,7 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard() { message.Printf( _( "\nPCB has %d empty or invalid reference designations." - "\nRecommend you run DRC with 'Test footprints against schematic' checked.\n" ), + "\nRecommend running DRC with 'Test footprints against schematic' checked.\n" ), (int) BadRefDes.size() ); for( const RefDesInfo& mod : BadRefDes ) @@ -601,69 +585,25 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard() message += _( "Reannotate anyway?" ); if( !IsOK( m_frame, message ) ) - return ( false ); - } - - payload.clear(); // If not updating schematic no netlist error. - - // If updating schematic send a netlist. - if( m_UpdateSchematic->GetValue() ) - { - - for( FOOTPRINT* footprint : m_footprints ) - { - // Create a netlist - newref = GetNewRefDes( footprint ); - - if( nullptr == newref ) - return false; // Not found in changelist - - // Add to the netlist - netlist.AddComponent( new COMPONENT( footprint->GetFPID(), newref->NewRefDes, - footprint->GetValue(), footprint->GetPath(), - { footprint->m_Uuid } ) ); - } - - netlist.Format( "pcb_netlist", &stringformatter, 0, - CTL_OMIT_NETS | CTL_OMIT_FILTERS | CTL_OMIT_FP_UUID ); - - payload = stringformatter.GetString(); // Create netlist - - // Send netlist to Eeschema. - bool attemptreannotate = m_frame->ReannotateSchematic( payload ); - - if( !attemptreannotate ) - { - // Didn't get a valid reply. - ShowReport( _( "\nReannotate failed!\n" ), RPT_SEVERITY_WARNING ); return false; - } - } - bool reannotateOk = payload.size() == 0; - - ShowReport( payload, reannotateOk ? RPT_SEVERITY_ACTION : RPT_SEVERITY_ERROR ); BOARD_COMMIT commit( m_frame ); - if( reannotateOk ) + for( FOOTPRINT* footprint : m_footprints ) { + newref = GetNewRefDes( footprint ); - for( FOOTPRINT* footprint : m_footprints ) - { - newref = GetNewRefDes( footprint ); + if( nullptr == newref ) + return false; - if( nullptr == newref ) - return false; - - commit.Modify( footprint ); // Make a copy for undo - footprint->SetReference( newref->NewRefDes ); // Update the PCB reference - m_frame->GetCanvas()->GetView()->Update( footprint ); // Touch the footprint - } + commit.Modify( footprint ); // Make a copy for undo + footprint->SetReference( newref->NewRefDes ); // Update the PCB reference + m_frame->GetCanvas()->GetView()->Update( footprint ); // Touch the footprint } commit.Push( "Geographic reannotation" ); - return reannotateOk; + return true; } diff --git a/pcbnew/dialogs/dialog_board_reannotate.h b/pcbnew/dialogs/dialog_board_reannotate.h index 2d99dd0545..3c4f91b4da 100644 --- a/pcbnew/dialogs/dialog_board_reannotate.h +++ b/pcbnew/dialogs/dialog_board_reannotate.h @@ -192,8 +192,6 @@ private: std::vector m_refDesTypes; std::vector m_excludeArray; - bool m_standalone; - int m_sortCode; int m_gridIndex; int m_annotationChoice; diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.cpp b/pcbnew/dialogs/dialog_board_reannotate_base.cpp index f6d038d161..f24ac3d962 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -169,27 +169,23 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx AnnotateLabel = new wxStaticText( sbSizeScope->GetStaticBox(), wxID_ANY, _("Reannotate:"), wxDefaultPosition, wxDefaultSize, 0 ); AnnotateLabel->Wrap( -1 ); - fgSizer6111->Add( AnnotateLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizer6111->Add( AnnotateLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_AnnotateAll = new wxRadioButton( sbSizeScope->GetStaticBox(), wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 ); m_AnnotateAll->SetValue( true ); - fgSizer6111->Add( m_AnnotateAll, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizer6111->Add( m_AnnotateAll, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_AnnotateFront = new wxRadioButton( sbSizeScope->GetStaticBox(), wxID_ANY, _("Front"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateFront, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizer6111->Add( m_AnnotateFront, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_AnnotateBack = new wxRadioButton( sbSizeScope->GetStaticBox(), wxID_ANY, _("Back"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateBack, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizer6111->Add( m_AnnotateBack, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_AnnotateSelection = new wxRadioButton( sbSizeScope->GetStaticBox(), wxID_ANY, _("Selection"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateSelection, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + fgSizer6111->Add( m_AnnotateSelection, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - sbSizeScope->Add( fgSizer6111, 0, wxTOP, 5 ); - - m_UpdateSchematic = new wxCheckBox( sbSizeScope->GetStaticBox(), wxID_ANY, _("Update schematic"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UpdateSchematic->SetValue(true); - sbSizeScope->Add( m_UpdateSchematic, 0, wxALL, 5 ); + sbSizeScope->Add( fgSizer6111, 0, wxBOTTOM|wxTOP, 5 ); bSizerOpts->Add( sbSizeScope, 0, wxALL|wxEXPAND, 5 ); @@ -274,10 +270,10 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx m_ExcludeListText->Wrap( -1 ); m_ExcludeListText->SetToolTip( _("Do not re-annotate this type \nof reference (R means R*)") ); - gbSizer1->Add( m_ExcludeListText, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_ExcludeListText, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); m_ExcludeList = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - gbSizer1->Add( m_ExcludeList, wxGBPosition( 5, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + gbSizer1->Add( m_ExcludeList, wxGBPosition( 5, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxLEFT|wxRIGHT, 5 ); gbSizer1->AddGrowableCol( 1 ); @@ -327,6 +323,7 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx this->SetSizer( bmainSizer ); this->Layout(); + bmainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_BOARD_REANNOTATE_BASE::OnClose ) ); diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.fbp b/pcbnew/dialogs/dialog_board_reannotate_base.fbp index c557408946..50369aabb2 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.fbp +++ b/pcbnew/dialogs/dialog_board_reannotate_base.fbp @@ -14,6 +14,7 @@ dialog_board_reannotate_base 1000 none + 1 dialog_board_reannotate_base @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -45,7 +47,7 @@ DIALOG_BOARD_REANNOTATE_BASE - 573,566 + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Geographical Reannotation @@ -1535,7 +1537,7 @@ none 5 - wxTOP + wxBOTTOM|wxTOP 0 5 @@ -1551,7 +1553,7 @@ 0 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 0 1 @@ -1612,7 +1614,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 0 1 @@ -1676,7 +1678,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 0 1 @@ -1740,7 +1742,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 0 1 @@ -1804,7 +1806,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 0 1 @@ -1868,70 +1870,6 @@ - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Update schematic - - 0 - - - 0 - - 1 - m_UpdateSchematic - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - @@ -2743,7 +2681,7 @@ 5 1 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT 5 1 @@ -2807,7 +2745,7 @@ 5 4 1 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND|wxLEFT|wxRIGHT 5 1 diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.h b/pcbnew/dialogs/dialog_board_reannotate_base.h index dbdec09f1b..22ff931888 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.h +++ b/pcbnew/dialogs/dialog_board_reannotate_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Jun 3 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -27,10 +27,10 @@ class WX_HTML_REPORT_PANEL; #include #include #include -#include #include #include #include +#include #include #include #include @@ -74,7 +74,6 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM wxRadioButton* m_AnnotateFront; wxRadioButton* m_AnnotateBack; wxRadioButton* m_AnnotateSelection; - wxCheckBox* m_UpdateSchematic; wxPanel* m_Advanced; wxStaticText* m_FrontRefDesStartText; wxTextCtrl* m_FrontRefDesStart; @@ -104,7 +103,7 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM public: - DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Geographical Reannotation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 573,566 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Geographical Reannotation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_BOARD_REANNOTATE_BASE(); }; diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index c6d4b79e84..4a874fe378 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -1392,13 +1392,6 @@ bool PCB_EDIT_FRAME::TestStandalone() } -bool PCB_EDIT_FRAME::ReannotateSchematic( std::string& aNetlist ) -{ - Kiway().ExpressMail( FRAME_SCH, MAIL_REANNOTATE, aNetlist, this ); - return true; -} - - bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage ) { diff --git a/pcbnew/pcb_edit_frame.h b/pcbnew/pcb_edit_frame.h index f608bf69a9..b829fef5f9 100644 --- a/pcbnew/pcb_edit_frame.h +++ b/pcbnew/pcb_edit_frame.h @@ -588,14 +588,6 @@ public: */ bool FetchNetlistFromSchematic( NETLIST& aNetlist, const wxString& aAnnotateMessage ); - /** - * Send a command to Eeschema to re-annotate the schematic. - * - * @param aNetlist a #NETLIST filled in by the caller. - * @return false if failed due to standalone mode, true if a reply. - */ - bool ReannotateSchematic( std::string& aNetlist ); - /** * Test if standalone mode. * diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index d03128813f..c83f33d433 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -1,7 +1,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * -* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors. +* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -430,8 +430,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() &m_Reannotate.remove_front_prefix, false ) ); m_params.emplace_back( new PARAM( "reannotate_dialog.annotate_remove_back_prefix", &m_Reannotate.remove_back_prefix, false ) ); - m_params.emplace_back( new PARAM( "reannotate_dialog.annotate_update_schematic", - &m_Reannotate.update_schematic, true ) ); m_params.emplace_back( new PARAM( "reannotate_dialog.annotate_exclude_locked", &m_Reannotate.exclude_locked, false ) ); diff --git a/pcbnew/pcbnew_settings.h b/pcbnew/pcbnew_settings.h index 344eaf53a0..1878bca2f9 100644 --- a/pcbnew/pcbnew_settings.h +++ b/pcbnew/pcbnew_settings.h @@ -195,7 +195,6 @@ public: bool sort_on_fp_location; bool remove_front_prefix; bool remove_back_prefix; - bool update_schematic; bool exclude_locked; int grid_index; int sort_code;