Improve ease of understanding around PCB <-> schematic links.

Includes improvements to Update PCB from Schematic dialog and
corresponding changes to Symbol Properties, Sheet Properties and
Footprint Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4012
This commit is contained in:
Jeff Young 2020-03-13 17:28:17 +00:00
parent 1e40753d33
commit 222b222299
17 changed files with 1070 additions and 1067 deletions

View File

@ -94,6 +94,13 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( SCH_EDIT
m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
m_bpMoveDown->SetBitmap( KiBitmap( small_down_xpm ) );
// Set font sizes
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
m_timeStampLabel->SetFont( infoFont );
m_textCtrlTimeStamp->SetFont( infoFont );
m_textCtrlTimeStamp->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
// wxFormBuilder doesn't include this event...
m_grid->Connect( wxEVT_GRID_CELL_CHANGING,
wxGridEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnGridCellChanging ),

View File

@ -201,10 +201,9 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE
wxBoxSizer* bSizerUUID;
bSizerUUID = new wxBoxSizer( wxHORIZONTAL );
wxStaticText* timeStampLabel;
timeStampLabel = new wxStaticText( this, wxID_ANY, _("Unique ID:"), wxDefaultPosition, wxDefaultSize, 0 );
timeStampLabel->Wrap( -1 );
bSizerUUID->Add( timeStampLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_timeStampLabel = new wxStaticText( this, wxID_ANY, _("Unique ID:"), wxDefaultPosition, wxDefaultSize, 0 );
m_timeStampLabel->Wrap( -1 );
bSizerUUID->Add( m_timeStampLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_textCtrlTimeStamp = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
m_textCtrlTimeStamp->SetToolTip( _("Unique ID that identifies the symbol") );

View File

@ -1259,11 +1259,11 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">timeStampLabel</property>
<property name="name">m_timeStampLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">none</property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>

View File

@ -60,6 +60,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_BASE : public DIALOG_SHIM
wxRadioBox* m_rbOrientation;
wxRadioBox* m_rbMirror;
wxStaticLine* m_staticline1;
wxStaticText* m_timeStampLabel;
wxTextCtrl* m_textCtrlTimeStamp;
wxButton* m_spiceFieldsButton;
wxStdDialogButtonSizer* m_stdDialogButtonSizer;

View File

@ -71,6 +71,16 @@ DIALOG_SCH_SHEET_PROPS::DIALOG_SCH_SHEET_PROPS( SCH_EDIT_FRAME* aParent, SCH_SHE
m_bpMoveUp->SetBitmap( KiBitmap( small_up_xpm ) );
m_bpMoveDown->SetBitmap( KiBitmap( small_down_xpm ) );
// Set font sizes
wxFont infoFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
infoFont.SetSymbolicSize( wxFONTSIZE_SMALL );
m_hiearchicalPathLabel->SetFont( infoFont );
m_heirarchyPath->SetFont( infoFont );
m_heirarchyPath->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
m_timestampLabel->SetFont( infoFont );
m_textCtrlTimeStamp->SetFont( infoFont );
m_textCtrlTimeStamp->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
// wxFormBuilder doesn't include this event...
m_grid->Connect( wxEVT_GRID_CELL_CHANGING,
wxGridEventHandler( DIALOG_SCH_SHEET_PROPS::OnGridCellChanging ),

View File

@ -175,17 +175,16 @@ DIALOG_SCH_SHEET_PROPS_BASE::DIALOG_SCH_SHEET_PROPS_BASE( wxWindow* parent, wxWi
fgSizer1->SetFlexibleDirection( wxHORIZONTAL );
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Hierarchical Path:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
fgSizer1->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_hiearchicalPathLabel = new wxStaticText( this, wxID_ANY, _("Hierarchical Path:"), wxDefaultPosition, wxDefaultSize, 0 );
m_hiearchicalPathLabel->Wrap( -1 );
fgSizer1->Add( m_hiearchicalPathLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_heirarchyPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
fgSizer1->Add( m_heirarchyPath, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticText* timeStampLabel;
timeStampLabel = new wxStaticText( this, wxID_ANY, _("Unique ID:"), wxDefaultPosition, wxDefaultSize, 0 );
timeStampLabel->Wrap( -1 );
fgSizer1->Add( timeStampLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_timestampLabel = new wxStaticText( this, wxID_ANY, _("Unique ID:"), wxDefaultPosition, wxDefaultSize, 0 );
m_timestampLabel->Wrap( -1 );
fgSizer1->Add( m_timestampLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_textCtrlTimeStamp = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
m_textCtrlTimeStamp->SetToolTip( _("Unique ID that identifies the symbol") );

View File

@ -1098,7 +1098,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText2</property>
<property name="name">m_hiearchicalPathLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -1223,11 +1223,11 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">timeStampLabel</property>
<property name="name">m_timestampLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">none</property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>

View File

@ -57,8 +57,9 @@ class DIALOG_SCH_SHEET_PROPS_BASE : public DIALOG_SHIM
wxStaticText* m_backgroundColorLabel;
COLOR_SWATCH* m_backgroundColorSwatch;
wxStaticLine* m_staticline1;
wxStaticText* m_staticText2;
wxStaticText* m_hiearchicalPathLabel;
wxTextCtrl* m_heirarchyPath;
wxStaticText* m_timestampLabel;
wxTextCtrl* m_textCtrlTimeStamp;
wxStdDialogButtonSizer* m_stdDialogButtonSizer;
wxButton* m_stdDialogButtonSizerOK;

View File

@ -118,6 +118,11 @@ DIALOG_FOOTPRINT_BOARD_EDITOR::DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aP
m_staticTextInfoCopper->SetFont( infoFont );
m_staticTextInfoPaste->SetFont( infoFont );
m_libraryIDLabel->SetFont( infoFont );
m_tcLibraryID->SetFont( infoFont );
m_sheetPathLabel->SetFont( infoFont );
m_tcSheetPath->SetFont( infoFont );
infoFont.SetStyle( wxFONTSTYLE_ITALIC );
m_staticTextInfoValNeg->SetFont( infoFont );
m_staticTextInfoValPos->SetFont( infoFont );
@ -258,6 +263,8 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
m_posX.SetValue( m_footprint->GetPosition().x );
m_posY.SetValue( m_footprint->GetPosition().y );
m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 );
m_OrientValue = m_footprint->GetOrientation() / 10.0;
if( m_OrientValue == 0.0 )
@ -273,21 +280,6 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
updateOrientationControl();
m_BoardSideCtrl->SetSelection( (m_footprint->GetLayer() == B_Cu) ? 1 : 0 );
wxString path = "/";
// Exclude the last path step (it's the component)
for( size_t i = 0; i + 1 < m_footprint->GetPath().size(); ++i )
{
if( path.length() > 1 )
path += "/";
path += Prj().GetSheetName( m_footprint->GetPath()[i] );
}
m_tcUniqueID->SetValue( path );
if( m_footprint->IsLocked() )
m_AutoPlaceCtrl->SetSelection( 2 );
else if( m_footprint->PadsLocked() )
@ -391,6 +383,21 @@ bool DIALOG_FOOTPRINT_BOARD_EDITOR::TransferDataToWindow()
// Show the footprint's ID.
m_tcLibraryID->SetValue( m_footprint->GetFPID().Format() );
m_tcSheetPath->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
wxString path = "/";
// Exclude the last path step (it's the component)
for( size_t i = 0; i + 1 < m_footprint->GetPath().size(); ++i )
{
if( path.length() > 1 )
path += "/";
path += Prj().GetSheetName( m_footprint->GetPath()[i] );
}
m_tcSheetPath->SetValue( path );
m_tcSheetPath->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
for( int col = 0; col < m_itemsGrid->GetNumberCols(); col++ )
{

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -106,44 +106,56 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
bSizerLeft = new wxBoxSizer( wxVERTICAL );
bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
wxStaticBoxSizer* sbSizer7;
sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Position") ), wxVERTICAL );
wxFlexGridSizer* fgSizerPos;
fgSizerPos = new wxFlexGridSizer( 2, 3, 4, 0 );
fgSizerPos = new wxFlexGridSizer( 3, 3, 2, 0 );
fgSizerPos->AddGrowableCol( 1 );
fgSizerPos->AddGrowableRow( 0 );
fgSizerPos->AddGrowableRow( 1 );
fgSizerPos->SetFlexibleDirection( wxHORIZONTAL );
fgSizerPos->AddGrowableRow( 2 );
fgSizerPos->SetFlexibleDirection( wxBOTH );
fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosLabel->Wrap( -1 );
fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_ModPositionX = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_ModPositionX = new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosUnit = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosUnit->Wrap( -1 );
fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosLabel->Wrap( -1 );
fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_ModPositionY = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_ModPositionY = new wxTextCtrl( sbSizer7->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosUnit = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosUnit->Wrap( -1 );
fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_BoardSideLabel = new wxStaticText( sbSizer7->GetStaticBox(), wxID_ANY, _("Side:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BoardSideLabel->Wrap( -1 );
fgSizerPos->Add( m_BoardSideLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
wxString m_BoardSideCtrlChoices[] = { _("Front"), _("Back") };
int m_BoardSideCtrlNChoices = sizeof( m_BoardSideCtrlChoices ) / sizeof( wxString );
m_BoardSideCtrl = new wxChoice( sbSizer7->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardSideCtrlNChoices, m_BoardSideCtrlChoices, 0 );
m_BoardSideCtrl->SetSelection( 0 );
fgSizerPos->Add( m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 5 );
bSizerLeft->Add( fgSizerPos, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
sbSizer7->Add( fgSizerPos, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 3 );
bSizerLeft->Add( sbSizer7, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bSizerLeft->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 3 );
wxStaticBoxSizer* sbOrientationSizer;
sbOrientationSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Orientation") ), wxVERTICAL );
@ -177,33 +189,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
sbOrientationSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
bSizerLeft->Add( sbOrientationSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerFpInfo;
fgSizerFpInfo = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizerFpInfo->AddGrowableCol( 1 );
fgSizerFpInfo->SetFlexibleDirection( wxBOTH );
fgSizerFpInfo->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_BoardSideLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Board side:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BoardSideLabel->Wrap( -1 );
fgSizerFpInfo->Add( m_BoardSideLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
wxString m_BoardSideCtrlChoices[] = { _("Front"), _("Back") };
int m_BoardSideCtrlNChoices = sizeof( m_BoardSideCtrlChoices ) / sizeof( wxString );
m_BoardSideCtrl = new wxChoice( m_PanelGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_BoardSideCtrlNChoices, m_BoardSideCtrlChoices, 0 );
m_BoardSideCtrl->SetSelection( 0 );
fgSizerFpInfo->Add( m_BoardSideCtrl, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
m_BoardUniqueIDlabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Sheet path:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BoardUniqueIDlabel->Wrap( -1 );
fgSizerFpInfo->Add( m_BoardUniqueIDlabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_tcUniqueID = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
fgSizerFpInfo->Add( m_tcUniqueID, 0, wxALL|wxEXPAND, 5 );
bSizerLeft->Add( fgSizerFpInfo, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerLeft->Add( sbOrientationSizer, 0, wxEXPAND|wxALL, 5 );
bSizerProperties->Add( bSizerLeft, 1, wxEXPAND, 5 );
@ -215,7 +201,10 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Move and Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
bSizerMiddle->Add( m_AutoPlaceCtrl, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerMiddle->Add( m_AutoPlaceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerMiddle->Add( 0, 0, 1, wxEXPAND, 5 );
m_sizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Auto-placement Rules") ), wxVERTICAL );
@ -234,7 +223,7 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
m_sizerAP->Add( m_sizerAllow90, 0, wxEXPAND, 5 );
m_sizerAP->Add( 0, 8, 1, wxEXPAND, 5 );
m_sizerAP->Add( 0, 8, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_sizerAllow180 = new wxBoxSizer( wxVERTICAL );
@ -510,22 +499,36 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
bSizerButtons = new wxBoxSizer( wxHORIZONTAL );
wxFlexGridSizer* fgSizerSymbolRef;
fgSizerSymbolRef = new wxFlexGridSizer( 0, 2, 1, 0 );
fgSizerSymbolRef = new wxFlexGridSizer( 0, 2, 5, 0 );
fgSizerSymbolRef->AddGrowableCol( 1 );
fgSizerSymbolRef->SetFlexibleDirection( wxBOTH );
fgSizerSymbolRef->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library Id:"), wxDefaultPosition, wxDefaultSize, 0 );
m_libraryIDLabel = new wxStaticText( this, wxID_ANY, _("Library link:"), wxDefaultPosition, wxDefaultSize, 0 );
m_libraryIDLabel->Wrap( -1 );
m_libraryIDLabel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
fgSizerSymbolRef->Add( m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 3 );
fgSizerSymbolRef->Add( m_libraryIDLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
m_tcLibraryID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
fgSizerSymbolRef->Add( m_tcLibraryID, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
m_tcLibraryID->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
fgSizerSymbolRef->Add( m_tcLibraryID, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
m_sheetPathLabel = new wxStaticText( this, wxID_ANY, _("Symbol link:"), wxDefaultPosition, wxDefaultSize, 0 );
m_sheetPathLabel->Wrap( -1 );
fgSizerSymbolRef->Add( m_sheetPathLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_tcSheetPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
m_tcSheetPath->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_BTNFACE ) );
fgSizerSymbolRef->Add( m_tcSheetPath, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizerButtons->Add( fgSizerSymbolRef, 1, wxALIGN_CENTER_VERTICAL, 10 );
bSizerButtons->Add( fgSizerSymbolRef, 1, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 10 );
bSizerButtons->Add( 80, 0, 0, wxEXPAND, 5 );
m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jul 10 2019)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -29,9 +29,9 @@ class WX_GRID;
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/choice.h>
#include <wx/radiobut.h>
#include <wx/gbsizer.h>
#include <wx/choice.h>
#include <wx/radiobox.h>
#include <wx/slider.h>
#include <wx/panel.h>
@ -63,16 +63,14 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM
wxStaticText* m_YPosLabel;
wxTextCtrl* m_ModPositionY;
wxStaticText* m_YPosUnit;
wxStaticText* m_BoardSideLabel;
wxChoice* m_BoardSideCtrl;
wxRadioButton* m_Orient0;
wxRadioButton* m_Orient90;
wxRadioButton* m_Orient270;
wxRadioButton* m_Orient180;
wxRadioButton* m_OrientOther;
wxTextCtrl* m_OrientValueCtrl;
wxStaticText* m_BoardSideLabel;
wxChoice* m_BoardSideCtrl;
wxStaticText* m_BoardUniqueIDlabel;
wxTextCtrl* m_tcUniqueID;
wxRadioBox* m_AutoPlaceCtrl;
wxStaticBoxSizer* m_sizerAP;
wxBoxSizer* m_sizerAllow90;
@ -116,6 +114,8 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM
wxBoxSizer* bLowerSizer3D;
wxStaticText* m_libraryIDLabel;
wxTextCtrl* m_tcLibraryID;
wxStaticText* m_sheetPathLabel;
wxTextCtrl* m_tcSheetPath;
wxStdDialogButtonSizer* m_sdbSizerStdButtons;
wxButton* m_sdbSizerStdButtonsOK;
wxButton* m_sdbSizerStdButtonsCancel;

View File

@ -25,7 +25,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <common.h>
#include <pcb_edit_frame.h>
#include <pcbnew_settings.h>
#include <dialog_update_pcb.h>
@ -35,18 +34,14 @@
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <tools/selection_tool.h>
#include <class_draw_panel_gal.h>
#include <class_board.h>
#include <ratsnest_data.h>
#include <view/view.h>
#include <functional>
#include <kiface_i.h>
using namespace std::placeholders;
bool DIALOG_UPDATE_PCB::m_warnForNoNetPads = false;
bool DIALOG_UPDATE_PCB::m_matchByUUID = false;
DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist ) :
@ -61,7 +56,6 @@ DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist
m_cbDeleteExtraFootprints->SetValue( cfg->m_NetlistDialog.delete_extra_footprints );
m_cbDeleteSinglePadNets->SetValue( cfg->m_NetlistDialog.delete_single_pad_nets );
m_cbWarnNoNetPad->SetValue( m_warnForNoNetPads );
m_matchByTimestamp->SetSelection( m_matchByUUID ? 0 : 1 );
m_messagePanel->SetLabel( _("Changes To Be Applied") );
m_messagePanel->SetLazyUpdate( true );
@ -88,7 +82,6 @@ DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST* aNetlist
DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB()
{
m_warnForNoNetPads = m_cbWarnNoNetPad->GetValue();
m_matchByUUID = m_matchByTimestamp->GetSelection() == 0;
auto cfg = m_frame->GetSettings();
@ -115,18 +108,16 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
m_runDragCommand = false;
m_netlist->SetDeleteExtraFootprints( m_cbDeleteExtraFootprints->GetValue() );
m_netlist->SetFindByTimeStamp( m_matchByTimestamp->GetSelection() == 0 );
m_netlist->SetFindByTimeStamp( !m_cbRelinkFootprints->GetValue() );
m_netlist->SetReplaceFootprints( m_cbUpdateFootprints->GetValue() );
BOARD_NETLIST_UPDATER updater( m_frame, m_frame->GetBoard() );
updater.SetReporter ( &reporter );
updater.SetIsDryRun( aDryRun );
updater.SetLookupByTimestamp( m_matchByTimestamp->GetSelection() == 0 );
updater.SetLookupByTimestamp( !m_cbRelinkFootprints->GetValue() );
updater.SetDeleteUnusedComponents ( m_cbDeleteExtraFootprints->GetValue() );
updater.SetReplaceFootprints( m_cbUpdateFootprints->GetValue() );
updater.SetDeleteSinglePadNets( m_cbDeleteSinglePadNets->GetValue() );
m_warnForNoNetPads = m_cbWarnNoNetPad->GetValue();
m_matchByUUID = m_matchByTimestamp->GetSelection() == 0;
updater.SetWarnPadNoNetInNetlist( m_warnForNoNetPads );
updater.UpdateNetlist( *m_netlist );
@ -139,13 +130,6 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
}
void DIALOG_UPDATE_PCB::OnMatchChanged( wxCommandEvent& event )
{
if( m_initialized )
PerformUpdate( true );
}
void DIALOG_UPDATE_PCB::OnOptionChanged( wxCommandEvent& event )
{
if( m_initialized )

View File

@ -37,9 +37,6 @@ private:
bool m_initialized;
bool m_runDragCommand;
static bool m_warnForNoNetPads;
static bool m_matchByUUID; // True to use UUID as link between symbol and footprint
// False to use reference designator as link
// between symbol and footprint
public:
DIALOG_UPDATE_PCB( PCB_EDIT_FRAME* aParent, NETLIST *aNetlist );
@ -49,7 +46,6 @@ public:
private:
void OnMatchChanged( wxCommandEvent& event ) override;
void OnOptionChanged( wxCommandEvent& event ) override;
void OnUpdateClick( wxCommandEvent& event ) override;

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version v3.8.0)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -13,101 +13,94 @@
DIALOG_UPDATE_PCB_BASE::DIALOG_UPDATE_PCB_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
{
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bUpperSizer;
bUpperSizer = new wxBoxSizer( wxVERTICAL );
wxString m_matchByTimestampChoices[] = { _("Update footprint references to match any changed symbol references"), _("Update footprint associations by existing references") };
int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString );
m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Match Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS );
m_matchByTimestamp->SetSelection( 0 );
m_matchByTimestamp->SetToolTip( _("The first option uses the existing links between symbols and their footprints to update the footprints based on changes made to their symbols. \n\nThe second option uses the symbol and footprint references to establish a new set of links between symbols and footprints, and then updates the footprints accordingly.") );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
bUpperSizer->Add( m_matchByTimestamp, 0, wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_cbRelinkFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Re-link footprints to schematic symbols based on their Reference fields"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_cbRelinkFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no symbols"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbDeleteExtraFootprints->SetToolTip( _("Remove from the board unlocked footprints which are not linked to a schematic symbol.") );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 2, 0 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints of symbols whose footprint assignments have changed"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbUpdateFootprints->SetToolTip( _("Normally footprints on the board should be changed to match footprint assignment changes made in the schematic. Uncheck this only if you don't want to change existing footprints on the board.") );
m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints with those specified in the schematic"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbUpdateFootprints->SetToolTip( _("Normally footprints on the board should be changed to match footprint assignment changes made in the schematic. Uncheck this only if you don't want to change existing footprints on the board.") );
gbSizer1->Add( m_cbUpdateFootprints, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALL, 5 );
sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no associated symbol"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbDeleteExtraFootprints->SetToolTip( _("Remove from the board not locked footprints, \nif they are not attached to a schematic symbol.") );
wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
gbSizer1->Add( m_cbDeleteExtraFootprints, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete nets containing only a single pad"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbDeleteSinglePadNets->SetToolTip( _("Clear the net name of pads when there is only one pad belonging to this net.") );
m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete nets containing only a single pad"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbDeleteSinglePadNets->SetToolTip( _("Clear the net name of pads when there is only one pad belonging to this net.") );
bSizer4->Add( m_cbDeleteSinglePadNets, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
gbSizer1->Add( m_cbDeleteSinglePadNets, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_cbWarnNoNetPad = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Generate warnings for pads with no nets"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbWarnNoNetPad->SetValue(true);
m_cbWarnNoNetPad->SetToolTip( _("Display a warning if a pad in a footprint does not appear in netlist.\nOnly pads on a copper layer and having a name are tested.") );
m_cbWarnNoNetPad = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Warn for no net pads"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbWarnNoNetPad->SetValue(true);
m_cbWarnNoNetPad->SetToolTip( _("Display a warning if a pad in a footprint does not appear in netlist.\nOnly pads on a copper layer and having a name are tested.") );
gbSizer1->Add( m_cbWarnNoNetPad, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizer4->Add( m_cbWarnNoNetPad, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
sbSizer1->Add( gbSizer1, 1, wxEXPAND, 5 );
sbSizer1->Add( bSizer4, 1, wxEXPAND|wxTOP, 5 );
bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bLowerSizer;
bLowerSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bLowerSizer;
bLowerSizer = new wxBoxSizer( wxVERTICAL );
bLowerSizer->SetMinSize( wxSize( 660,300 ) );
m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
bLowerSizer->SetMinSize( wxSize( 660,300 ) );
m_messagePanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
bLowerSizer->Add( m_messagePanel, 1, wxEXPAND | wxALL, 5 );
bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
bMainSizer->Add( bLowerSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
m_sdbSizer1 = new wxStdDialogButtonSizer();
m_sdbSizer1OK = new wxButton( this, wxID_OK );
m_sdbSizer1->AddButton( m_sdbSizer1OK );
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
m_sdbSizer1->Realize();
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChanged ), NULL, this );
m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteSinglePadNets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbWarnNoNetPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
// Connect Events
m_cbRelinkFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteExtraFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteSinglePadNets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbWarnNoNetPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
}
DIALOG_UPDATE_PCB_BASE::~DIALOG_UPDATE_PCB_BASE()
{
// Disconnect Events
m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnMatchChanged ), NULL, this );
m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbWarnNoNetPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
// Disconnect Events
m_cbRelinkFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteExtraFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_cbWarnNoNetPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnOptionChanged ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_PCB_BASE::OnUpdateClick ), NULL, this );
}

View File

@ -112,7 +112,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Re-link footprints to schematic symbols based on their current references</property>
<property name="label">Re-link footprints to schematic symbols based on their Reference fields</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -120,7 +120,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_checkBox5</property>
<property name="name">m_cbRelinkFootprints</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -141,70 +141,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<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">0</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">Delete footprints with no linked symbol</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_cbDeleteExtraFootprints</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">Remove from the board not locked footprints, &#x0A;if they are not attached to a schematic symbol.</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>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
@ -241,7 +177,72 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Update footprints to footprint specified in linked schematic symbol</property>
<property name="label">Delete footprints with no symbols</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_cbDeleteExtraFootprints</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">Remove from the board unlocked footprints which are not linked to a schematic symbol.</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>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<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">0</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">Replace footprints with those specified in the schematic</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@ -277,140 +278,141 @@
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">1</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<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">0</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">Delete nets containing only a single pad</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>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbDeleteSinglePadNets</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">Clear the net name of pads when there is only one pad belonging to this net.</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>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<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">Generate warnings for pads with no nets</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_cbWarnNoNetPad</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">Display a warning if a pad in a footprint does not appear in netlist.&#x0A;Only pads on a copper layer and having a name are tested.</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>
<event name="OnCheckBox">OnOptionChanged</event>
<property name="name">bSizer4</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">1</property>
<object class="wxCheckBox" expanded="1">
<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">0</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">Delete nets containing only a single pad</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_cbDeleteSinglePadNets</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">Clear the net name of pads when there is only one pad belonging to this net.</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>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="proportion">1</property>
<object class="wxCheckBox" expanded="1">
<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">Generate warnings for pads with no nets</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_cbWarnNoNetPad</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">Display a warning if a pad in a footprint does not appear in netlist.&#x0A;Only pads on a copper layer and having a name are tested.</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>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
</object>
</object>
</object>
@ -474,7 +476,7 @@
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="size">-1,-1</property>
<property name="subclass">WX_HTML_REPORT_PANEL; wx_html_report_panel.h</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version v3.8.0)
// C++ code generated with wxFormBuilder (version Oct 26 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -14,13 +14,11 @@ class WX_HTML_REPORT_PANEL;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/radiobox.h>
#include <wx/checkbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/checkbox.h>
#include <wx/gbsizer.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/panel.h>
@ -34,29 +32,28 @@ class WX_HTML_REPORT_PANEL;
///////////////////////////////////////////////////////////////////////////////
class DIALOG_UPDATE_PCB_BASE : public DIALOG_SHIM
{
private:
private:
protected:
wxRadioBox* m_matchByTimestamp;
wxCheckBox* m_cbUpdateFootprints;
wxCheckBox* m_cbDeleteExtraFootprints;
wxCheckBox* m_cbDeleteSinglePadNets;
wxCheckBox* m_cbWarnNoNetPad;
WX_HTML_REPORT_PANEL* m_messagePanel;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
protected:
wxCheckBox* m_cbRelinkFootprints;
wxCheckBox* m_cbDeleteExtraFootprints;
wxCheckBox* m_cbUpdateFootprints;
wxCheckBox* m_cbDeleteSinglePadNets;
wxCheckBox* m_cbWarnNoNetPad;
WX_HTML_REPORT_PANEL* m_messagePanel;
wxStdDialogButtonSizer* m_sdbSizer1;
wxButton* m_sdbSizer1OK;
wxButton* m_sdbSizer1Cancel;
// Virtual event handlers, overide them in your derived class
virtual void OnMatchChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOptionChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUpdateClick( wxCommandEvent& event ) { event.Skip(); }
// Virtual event handlers, overide them in your derived class
virtual void OnOptionChanged( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUpdateClick( wxCommandEvent& event ) { event.Skip(); }
public:
public:
DIALOG_UPDATE_PCB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Update PCB from Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_UPDATE_PCB_BASE();
DIALOG_UPDATE_PCB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Update PCB from Schematic"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_UPDATE_PCB_BASE();
};