Pcbnew: remove update schematic option for geographical annotation dialog.

REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates.  Use "Update
Schematic from PCB" tool to update reference designation changes.

Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state.  The update schematic from board tool is
the correct method to sync any changes from the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
This commit is contained in:
Wayne Stambaugh 2021-04-22 12:45:59 -04:00
parent cf47d665ea
commit 54e18f6b1f
14 changed files with 36 additions and 330 deletions

View File

@ -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

View File

@ -35,7 +35,6 @@
#include <project/project_file.h>
#include <project/net_settings.h>
#include <tools/ee_actions.h>
#include <tools/reannotate.h>
#include <tools/sch_editor_control.h>
#include <advanced_config.h>
#include <netclass.h>
@ -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:;
}

View File

@ -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 <sch_edit_frame.h>
#include <tools/backannotate.h>
#include <reannotate.h>
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();
}

View File

@ -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 <reporter.h>
/**
* 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_ */

View File

@ -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 <maciej.suminski@cern.ch>
*
* 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
};

View File

@ -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<RefDesInfo> 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;
}

View File

@ -192,8 +192,6 @@ private:
std::vector<RefDesTypeStr> m_refDesTypes;
std::vector<wxString> m_excludeArray;
bool m_standalone;
int m_sortCode;
int m_gridIndex;
int m_annotationChoice;

View File

@ -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 ) );

View File

@ -14,6 +14,7 @@
<property name="file">dialog_board_reannotate_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="image_path_wrapper_function_name"></property>
<property name="indent_with_spaces"></property>
<property name="internationalize">1</property>
<property name="name">dialog_board_reannotate_base</property>
@ -25,6 +26,7 @@
<property name="skip_php_events">1</property>
<property name="skip_python_events">1</property>
<property name="ui_table">UI</property>
<property name="use_array_enum">0</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
@ -45,7 +47,7 @@
<property name="minimum_size"></property>
<property name="name">DIALOG_BOARD_REANNOTATE_BASE</property>
<property name="pos"></property>
<property name="size">573,566</property>
<property name="size">-1,-1</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
<property name="title">Geographical Reannotation</property>
@ -1535,7 +1537,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxTOP</property>
<property name="flag">wxBOTTOM|wxTOP</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="1">
<property name="cols">5</property>
@ -1551,7 +1553,7 @@
<property name="vgap">0</property>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="0">
<property name="BottomDockable">1</property>
@ -1612,7 +1614,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
@ -1676,7 +1678,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
@ -1740,7 +1742,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
@ -1804,7 +1806,7 @@
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="0">
<property name="BottomDockable">1</property>
@ -1868,70 +1870,6 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">1</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Update schematic</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_UpdateSchematic</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
@ -2743,7 +2681,7 @@
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="0">
@ -2807,7 +2745,7 @@
<property name="border">5</property>
<property name="colspan">4</property>
<property name="column">1</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="0">

View File

@ -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 <wx/stattext.h>
#include <wx/choice.h>
#include <wx/statbox.h>
#include <wx/checkbox.h>
#include <wx/panel.h>
#include <wx/textctrl.h>
#include <wx/valgen.h>
#include <wx/checkbox.h>
#include <wx/gbsizer.h>
#include <wx/notebook.h>
#include <wx/button.h>
@ -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();
};

View File

@ -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 )
{

View File

@ -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.
*

View File

@ -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<bool>( "reannotate_dialog.annotate_remove_back_prefix",
&m_Reannotate.remove_back_prefix, false ) );
m_params.emplace_back( new PARAM<bool>( "reannotate_dialog.annotate_update_schematic",
&m_Reannotate.update_schematic, true ) );
m_params.emplace_back( new PARAM<bool>( "reannotate_dialog.annotate_exclude_locked",
&m_Reannotate.exclude_locked, false ) );

View File

@ -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;