Merge branch kicad:master into master

This commit is contained in:
Alihossein Sepahvand 2025-06-12 23:28:48 -06:00
commit 4100128f4d
33 changed files with 3134 additions and 3345 deletions

View File

@ -63,7 +63,7 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType, BASE_SCREEN* aS
makeEntry( aItem, CHT_REMOVE | flag, makeImage( aItem ), aScreen );
if( EDA_GROUP* parentGroup = aItem->GetParentGroup() )
Modify( parentGroup->AsEdaItem(), aScreen );
Modify( parentGroup->AsEdaItem(), aScreen, RECURSE_MODE::NO_RECURSE );
break;

View File

@ -95,7 +95,7 @@ bool DIALOG_GROUP_PROPERTIES::TransferDataFromWindow()
m_commit->Modify( item, m_frame->GetScreen() );
if( existingGroup )
m_commit->Modify( existingGroup->AsEdaItem(), m_frame->GetScreen() );
m_commit->Modify( existingGroup->AsEdaItem(), m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
}
}

View File

@ -171,7 +171,7 @@ int GROUP_TOOL::Ungroup( const TOOL_EVENT& aEvent )
for( EDA_ITEM* member : group->GetItems() )
{
m_commit->Modify( member, m_frame->GetScreen() );
m_commit->Modify( member, m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
toSelect.push_back( member );
}
@ -194,7 +194,7 @@ int GROUP_TOOL::AddToGroup( const TOOL_EVENT& aEvent )
{
const SELECTION& selection = m_selectionTool->GetSelection();
EDA_ITEM* group = nullptr;
EDA_GROUP* group = nullptr;
EDA_ITEMS toAdd;
for( EDA_ITEM* item : selection )
@ -205,7 +205,7 @@ int GROUP_TOOL::AddToGroup( const TOOL_EVENT& aEvent )
if( group != nullptr )
return 0;
group = item;
group = dynamic_cast<EDA_GROUP*>( item );
}
else if( !item->GetParentGroup() )
{
@ -218,25 +218,26 @@ int GROUP_TOOL::AddToGroup( const TOOL_EVENT& aEvent )
m_toolMgr->RunAction( ACTIONS::selectionClear );
m_commit->Modify( group, m_frame->GetScreen() );
m_commit->Modify( group->AsEdaItem(), m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
for( EDA_ITEM* item : toAdd )
{
EDA_GROUP* existingGroup = item->GetParentGroup();
KIID existingGroupId = existingGroup ? existingGroup->AsEdaItem()->m_Uuid : niluuid;
if( existingGroupId != group->m_Uuid )
if( existingGroup != group )
{
m_commit->Modify( item, m_frame->GetScreen() );
if( existingGroup )
m_commit->Modify( existingGroup->AsEdaItem(), m_frame->GetScreen() );
m_commit->Modify( existingGroup->AsEdaItem(), m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
group->AddItem( item );
}
}
m_commit->Push( _( "Add Items to Group" ) );
m_selectionTool->AddItemToSel( group );
m_selectionTool->AddItemToSel( group->AsEdaItem() );
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
m_frame->OnModify();
@ -255,7 +256,7 @@ int GROUP_TOOL::RemoveFromGroup( const TOOL_EVENT& aEvent )
{
if( EDA_GROUP* group = item->GetParentGroup() )
{
m_commit->Modify( group->AsEdaItem(), m_frame->GetScreen() );
m_commit->Modify( group->AsEdaItem(), m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
m_commit->Modify( item, m_frame->GetScreen() );
group->RemoveItem( item );
}

View File

@ -182,10 +182,10 @@ SCH_ITEM* SCH_ITEM::Duplicate( bool addToParentGroup, SCH_COMMIT* aCommit, bool
{
wxCHECK_MSG( aCommit, newItem, "Must supply a commit to update parent group" );
if( newItem->GetParentGroup() )
if( EDA_GROUP* group = newItem->GetParentGroup() )
{
aCommit->Modify( newItem->GetParentGroup()->AsEdaItem() );
newItem->GetParentGroup()->AddItem( newItem );
aCommit->Modify( group->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
group->AddItem( newItem );
}
}

View File

@ -99,7 +99,7 @@ void SCH_EDITOR_CONTROL::AssignFootprints( const std::string& aChangedSetOfRefer
isChanged = true;
SCH_SCREEN* screen = refs[ii].GetSheetPath().LastScreen();
commit.Modify( symbol, screen );
commit.Modify( symbol, screen, RECURSE_MODE::NO_RECURSE );
footprintField->SetText( footprint );
}
}

View File

@ -382,7 +382,7 @@ void BACK_ANNOTATE::applyChangelist()
return b ? _( "true" ) : _( "false" );
};
if( !m_dryRun )
commit.Modify( symbol, screen );
commit.Modify( symbol, screen, RECURSE_MODE::NO_RECURSE );
if( m_processReferences && ref.GetRef() != fpData.m_ref && !skip )
{

View File

@ -1530,7 +1530,7 @@ int SCH_EDIT_TOOL::RepeatDrawItem( const TOOL_EVENT& aEvent )
{
if( newItem->IsGroupableType() )
{
commit.Modify( enteredGroup );
commit.Modify( enteredGroup, m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
enteredGroup->AddItem( newItem );
}
}

View File

@ -471,7 +471,7 @@ int SCH_EDITOR_CONTROL::ExportSymbolsToLibrary( const TOOL_EVENT& aEvent )
wxCHECK2( parentScreen, continue );
commit.Modify( symbol, parentScreen );
commit.Modify( symbol, parentScreen, RECURSE_MODE::NO_RECURSE );
symbol->SetLibId( id );
append = true;
}
@ -2492,7 +2492,7 @@ int SCH_EDITOR_CONTROL::IncrementAnnotations( const TOOL_EVENT& aEvent )
num += dlg.m_Increment->GetValue();
fullRef << num;
commit.Modify( ref.GetSymbol(), sheet.LastScreen() );
commit.Modify( ref.GetSymbol(), sheet.LastScreen(), RECURSE_MODE::NO_RECURSE );
ref.GetSymbol()->SetRef( &sheet, From_UTF8( fullRef.c_str() ) );
}
}

View File

@ -358,7 +358,7 @@ int SCH_FIND_REPLACE_TOOL::ReplaceAndFindNext( const TOOL_EVENT& aEvent )
SCH_COMMIT commit( m_frame );
SCH_ITEM* sch_item = static_cast<SCH_ITEM*>( item );
commit.Modify( sch_item, sheet->LastScreen() );
commit.Modify( sch_item, sheet->LastScreen(), RECURSE_MODE::NO_RECURSE );
if( item->Replace( data, sheet ) )
{
@ -398,7 +398,7 @@ int SCH_FIND_REPLACE_TOOL::ReplaceAll( const TOOL_EVENT& aEvent )
auto doReplace =
[&]( SCH_ITEM* aItem, SCH_SHEET_PATH* aSheet, EDA_SEARCH_DATA& aData )
{
commit.Modify( aItem, aSheet->LastScreen() );
commit.Modify( aItem, aSheet->LastScreen(), RECURSE_MODE::NO_RECURSE );
if( aItem->Replace( aData, aSheet ) )
{

View File

@ -131,15 +131,19 @@ int SCH_GROUP_TOOL::Group( const TOOL_EVENT& aEvent )
SCH_SELECTION_TOOL* selTool = m_toolMgr->GetTool<SCH_SELECTION_TOOL>();
SCH_SELECTION selection = selTool->RequestSelection();
for( EDA_ITEM* item : selection.GetItems() )
// Iterate from the back so we don't have to worry about removals.
for( int ii = selection.GetSize() - 1; ii >= 0; --ii )
{
SCH_ITEM* schItem = static_cast<SCH_ITEM*>( item );
if( !selection[ii]->IsSCH_ITEM() )
{
selection.Remove( selection[ii] );
continue;
}
SCH_ITEM* schItem = static_cast<SCH_ITEM*>( selection[ii] );
if( !schItem->IsGroupableType() )
selection.Remove( item );
if( isSymbolEditor && schItem->GetParentSymbol() )
selection.Remove( item );
selection.Remove( schItem );
}
if( selection.Empty() )
@ -155,7 +159,10 @@ int SCH_GROUP_TOOL::Group( const TOOL_EVENT& aEvent )
for( EDA_ITEM* eda_item : selection )
{
m_commit->Modify( eda_item, screen );
if( EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
m_commit->Modify( existingGroup->AsEdaItem(), screen, RECURSE_MODE::NO_RECURSE );
m_commit->Modify( eda_item, screen, RECURSE_MODE::NO_RECURSE );
group->AddItem( eda_item );
}

View File

@ -637,7 +637,7 @@ bool SCH_MOVE_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aComm
{
if( schItem->IsGroupableType() && !schItem->GetParentGroup() )
{
aCommit->Modify( enteredGroup );
aCommit->Modify( enteredGroup, m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
enteredGroup->AddItem( schItem );
}
}
@ -648,7 +648,7 @@ bool SCH_MOVE_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aComm
}
else
{
aCommit->Modify( schItem, m_frame->GetScreen() );
aCommit->Modify( schItem, m_frame->GetScreen(), RECURSE_MODE::RECURSE );
}
schItem->SetFlags( IS_MOVING );

View File

@ -244,7 +244,7 @@ bool SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, SCH_COM
{
if( schItem->IsGroupableType() && !item->GetParentGroup() )
{
aCommit->Modify( enteredGroup );
aCommit->Modify( enteredGroup, m_frame->GetScreen(), RECURSE_MODE::NO_RECURSE );
enteredGroup->AddItem( schItem );
}
}

View File

@ -198,8 +198,11 @@ void SCH_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent )
for( EDA_ITEM* edaItem : selection )
{
if( !edaItem->IsSCH_ITEM() )
continue;
SCH_ITEM* item = static_cast<SCH_ITEM*>( edaItem );
changes.Modify( item, screen );
changes.Modify( item, screen, RECURSE_MODE::NO_RECURSE );
item->Set( property, newValue );
if( SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( item ) )

View File

@ -277,10 +277,10 @@ BOARD_ITEM* BOARD_ITEM::Duplicate( bool addToParentGroup, BOARD_COMMIT* aCommit
{
wxCHECK_MSG( aCommit, dupe, "Must supply a commit to update parent group" );
if( dupe->GetParentGroup() )
if( EDA_GROUP* group = dupe->GetParentGroup() )
{
aCommit->Modify( dupe->GetParentGroup()->AsEdaItem() );
dupe->GetParentGroup()->AddItem( dupe );
aCommit->Modify( group->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
group->AddItem( dupe );
}
}

View File

@ -42,9 +42,9 @@
#include <wx/valtext.h>
bool SortYFirst;
bool DescendingFirst;
bool DescendingSecond;
bool g_SortYFirst;
bool g_DescendingFirst;
bool g_DescendingSecond;
//
// This converts the index into a sort code. Note that Back sort code will have left and
@ -78,20 +78,12 @@ int BackDirectionsArray[] = {
#define SetSortCodes( DirArray, Code ) \
{ \
SortYFirst = ( ( DirArray[Code] & SORTYFIRST ) != 0 ); \
DescendingFirst = ( ( DirArray[Code] & DESCENDINGFIRST ) != 0 ); \
DescendingSecond = ( ( DirArray[Code] & DESCENDINGSECOND ) != 0 ); \
g_SortYFirst = ( ( DirArray[Code] & SORTYFIRST ) != 0 ); \
g_DescendingFirst = ( ( DirArray[Code] & DESCENDINGFIRST ) != 0 ); \
g_DescendingSecond = ( ( DirArray[Code] & DESCENDINGSECOND ) != 0 ); \
}
wxString AnnotateString[] = {
_( "All" ), // ANNOTATE_ALL
_( "Only front" ), // AnnotateFront
_( "Only back" ), // AnnotateBack
_( "Only selected" ) // ANNOTATE_SELECTED
};
wxString ActionMessage[] = {
"", // UPDATE_REFDES
_( "Empty" ), // EMPTY_REFDES
@ -100,12 +92,11 @@ wxString ActionMessage[] = {
};
DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame )
: DIALOG_BOARD_REANNOTATE_BASE( aParentFrame ),
DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame ) :
DIALOG_BOARD_REANNOTATE_BASE( aParentFrame ),
m_frame( aParentFrame ),
m_footprints( aParentFrame->GetBoard()->Footprints() )
{
m_frame = aParentFrame;
m_Config = Kiface().KifaceSettings();
InitValues();
// Init bitmaps associated to some wxRadioButton
@ -121,16 +112,14 @@ DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE( PCB_EDIT_FRAME* aParentFrame )
m_FrontRefDesStart->SetValidator( wxTextValidator( wxFILTER_DIGITS ) );
m_BackRefDesStart->SetValidator( wxTextValidator( wxFILTER_DIGITS ) );
m_sdbSizerOK->SetLabel( _( "Reannotate PCB" ) );
m_sdbSizerCancel->SetLabel( _( "Close" ) );
m_sdbSizer->Layout();
SetupStandardButtons( { { wxID_OK, _( "Reannotate PCB" ) },
{ wxID_CANCEL, _( "Close" ) } } );
m_settings = aParentFrame->config();
wxArrayString gridslist;
GRID_MENU::BuildChoiceList( &gridslist, m_settings, aParentFrame );
GRID_MENU::BuildChoiceList( &gridslist, m_frame->config(), aParentFrame );
if( -1 == m_gridIndex ) // If no default loaded
m_gridIndex = m_settings->m_Window.grid.last_size_idx; // Get the current grid size
m_gridIndex = m_frame->config()->m_Window.grid.last_size_idx; // Get the current grid size
m_sortGridx = m_frame->GetCanvas()->GetGAL()->GetGridSize().x;
m_sortGridy = m_frame->GetCanvas()->GetGAL()->GetGridSize().y;
@ -173,18 +162,7 @@ DIALOG_BOARD_REANNOTATE::~DIALOG_BOARD_REANNOTATE()
{
GetParameters(); // Get the current menu settings
PCBNEW_SETTINGS* cfg = nullptr;
try
{
cfg = m_frame->GetPcbNewSettings();
}
catch( const std::runtime_error& e )
{
wxFAIL_MSG( e.what() );
}
if( cfg )
if( PCBNEW_SETTINGS* cfg = m_frame->GetPcbNewSettings() )
{
cfg->m_Reannotate.sort_on_fp_location = m_locationChoice->GetSelection() == 0;
cfg->m_Reannotate.remove_front_prefix = m_RemoveFrontPrefix->GetValue();
@ -194,7 +172,6 @@ DIALOG_BOARD_REANNOTATE::~DIALOG_BOARD_REANNOTATE()
cfg->m_Reannotate.grid_index = m_gridIndex;
cfg->m_Reannotate.sort_code = m_sortCode;
cfg->m_Reannotate.annotation_choice = m_annotationScope;
cfg->m_Reannotate.report_severity = m_severity;
cfg->m_Reannotate.front_refdes_start = m_FrontRefDesStart->GetValue();
cfg->m_Reannotate.back_refdes_start = m_BackRefDesStart->GetValue();
@ -208,7 +185,8 @@ DIALOG_BOARD_REANNOTATE::~DIALOG_BOARD_REANNOTATE()
void DIALOG_BOARD_REANNOTATE::InitValues( void )
{
PCBNEW_SETTINGS* cfg = m_frame->GetPcbNewSettings();
if( PCBNEW_SETTINGS* cfg = m_frame->GetPcbNewSettings() )
{
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 );
@ -217,7 +195,6 @@ void DIALOG_BOARD_REANNOTATE::InitValues( void )
m_gridIndex = cfg->m_Reannotate.grid_index ;
m_sortCode = cfg->m_Reannotate.sort_code ;
m_annotationScope = cfg->m_Reannotate.annotation_choice ;
m_severity = cfg->m_Reannotate.report_severity;
m_FrontRefDesStart->SetValue( cfg->m_Reannotate.front_refdes_start );
m_BackRefDesStart->SetValue( cfg->m_Reannotate.back_refdes_start );
@ -225,6 +202,7 @@ void DIALOG_BOARD_REANNOTATE::InitValues( void )
m_BackPrefix->SetValue( cfg->m_Reannotate.back_prefix );
m_ExcludeList->SetValue( cfg->m_Reannotate.exclude_list );
m_MessageWindow->SetFileName( cfg->m_Reannotate.report_file_name );
}
}
@ -256,29 +234,22 @@ void DIALOG_BOARD_REANNOTATE::FilterPrefix( wxTextCtrl* aPrefix )
}
REFDES_TYPE_STR* DIALOG_BOARD_REANNOTATE::GetOrBuildRefDesInfo( const wxString& aRefDesPrefix,
unsigned int aStartRefDes )
REFDES_PREFIX_INFO* DIALOG_BOARD_REANNOTATE::GetOrBuildRefDesInfo( const wxString& aRefDesPrefix,
int aStartRefDes )
{
unsigned int requiredLastRef = ( aStartRefDes == 0 ? 1 : aStartRefDes ) - 1;
for( size_t i = 0; i < m_refDesTypes.size(); i++ ) // See if it is in the types array
for( size_t i = 0; i < m_refDesPrefixInfos.size(); i++ ) // See if it is in the info array
{
if( m_refDesTypes[i].RefDesType == aRefDesPrefix ) // Found it!
{
m_refDesTypes[i].LastUsedRefDes = std::max( m_refDesTypes[i].LastUsedRefDes,
requiredLastRef );
return &m_refDesTypes[i];
}
if( m_refDesPrefixInfos[i].RefDesPrefix == aRefDesPrefix ) // Found it!
return &m_refDesPrefixInfos[i];
}
// Wasn't in the types array so add it
REFDES_TYPE_STR newtype;
newtype.RefDesType = aRefDesPrefix;
newtype.LastUsedRefDes = requiredLastRef;
m_refDesTypes.push_back( newtype );
// Wasn't in the info array so add it
REFDES_PREFIX_INFO newtype;
newtype.RefDesPrefix = aRefDesPrefix;
newtype.LastUsedRefDes = aStartRefDes - 1;
m_refDesPrefixInfos.push_back( newtype );
return &m_refDesTypes.back();
return &m_refDesPrefixInfos.back();
}
@ -296,19 +267,7 @@ void DIALOG_BOARD_REANNOTATE::FilterBackPrefix( wxCommandEvent& event )
void DIALOG_BOARD_REANNOTATE::OnApplyClick( wxCommandEvent& event )
{
wxString warning;
if( m_frame->GetBoard()->IsEmpty() )
{
ShowReport( _( "No PCB to reannotate!" ), RPT_SEVERITY_ERROR );
return;
}
GetParameters(); // Figure out how this is to be done
MakeSampleText( warning );
if( !IsOK( m_frame, warning ) )
return;
if( ReannotateBoard() )
{
@ -324,81 +283,6 @@ void DIALOG_BOARD_REANNOTATE::OnApplyClick( wxCommandEvent& event )
}
void DIALOG_BOARD_REANNOTATE::MakeSampleText( wxString& aMessage )
{
aMessage.Printf( _( "\n%s footprints will be reannotated." ),
wxGetTranslation( AnnotateString[m_annotationScope] ) );
if( !m_ExcludeList->GetValue().empty() )
{
aMessage += wxString::Format( _( "\nAny reference types %s will not be annotated." ),
m_ExcludeList->GetValue() );
}
if( m_ExcludeLocked->GetValue() )
aMessage += wxString::Format( _( "\nLocked footprints will not be annotated" ) );
if( !m_AnnotateBack->GetValue() )
{
aMessage += wxString::Format( _( "\nFront footprints will start at %s" ),
m_FrontRefDesStart->GetValue() );
}
if( !m_AnnotateFront->GetValue() )
{
bool frontPlusOne = ( 0 == wxAtoi( m_BackRefDesStart->GetValue() ) )
&& !m_AnnotateBack->GetValue();
aMessage += wxString::Format( _( "\nBack footprints will start at %s." ),
frontPlusOne ? _( "the last front footprint + 1" ) :
m_BackRefDesStart->GetValue() );
}
if( !m_FrontPrefix->GetValue().empty() )
{
if( m_RemoveFrontPrefix->GetValue() )
{
aMessage += wxString::Format( _( "\nFront footprints starting with '%s' will have "
"the prefix removed." ),
m_FrontPrefix->GetValue() );
}
else
{
aMessage += wxString::Format( _( "\nFront footprints will have '%s' inserted as a "
"prefix." ),
m_FrontPrefix->GetValue() );
}
}
if( !m_BackPrefix->GetValue().empty() )
{
if( m_RemoveBackPrefix->GetValue() )
{
aMessage += wxString::Format( _( "\nBack footprints starting with '%s' will have the "
"prefix removed." ),
m_BackPrefix->GetValue() );
}
else
{
aMessage += wxString::Format( _( "\nBack footprints will have '%s' inserted as a "
"prefix." ),
m_BackPrefix->GetValue() );
}
}
bool fpLocation = m_locationChoice->GetSelection() == 0;
aMessage += wxString::Format( _( "\nPrior to sorting by %s, the coordinates of which will be "
"rounded to a %s, %s grid." ),
fpLocation ? _( "footprint location" )
: _( "reference designator location" ),
m_frame->MessageTextFromValue( m_sortGridx ),
m_frame->MessageTextFromValue( m_sortGridy ) );
ShowReport( aMessage, RPT_SEVERITY_INFO );
}
void DIALOG_BOARD_REANNOTATE::GetParameters()
{
m_sortCode = 0; // Convert radio button to sort direction code
@ -420,10 +304,10 @@ void DIALOG_BOARD_REANNOTATE::GetParameters()
// Get the chosen sort grid for rounding
m_gridIndex = m_GridChoice->GetSelection();
m_sortGridx = EDA_UNIT_UTILS::UI::DoubleValueFromString(
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.grids[m_gridIndex].x );
m_sortGridy = EDA_UNIT_UTILS::UI::DoubleValueFromString(
pcbIUScale, EDA_UNITS::MILS, m_settings->m_Window.grid.grids[m_gridIndex].y );
m_sortGridx = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::MILS,
m_frame->config()->m_Window.grid.grids[m_gridIndex].x );
m_sortGridy = EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::MILS,
m_frame->config()->m_Window.grid.grids[m_gridIndex].y );
m_annotationScope = ANNOTATE_ALL;
@ -469,21 +353,21 @@ static bool ChangeArrayCompare( const REFDES_CHANGE& aA, const REFDES_CHANGE& aB
/// Compare function to sort footprints.
/// @return true if the first coordinate should be before the second coordinate
static bool ModuleCompare( const REFDES_INFO& aA, const REFDES_INFO& aB )
static bool FootprintCompare( const REFDES_INFO& aA, const REFDES_INFO& aB )
{
int X0 = aA.roundedx, X1 = aB.roundedx, Y0 = aA.roundedy, Y1 = aB.roundedy;
if( SortYFirst ) //If sorting by Y then X, swap X and Y
if( g_SortYFirst ) //If sorting by Y then X, swap X and Y
{
std::swap( X0, Y0 );
std::swap( X1, Y1 );
}
// If descending, same compare just swap directions
if( DescendingFirst )
if( g_DescendingFirst )
std::swap( X0, X1 );
if( DescendingSecond )
if( g_DescendingSecond )
std::swap( Y0, Y1 );
if( X0 < X1 )
@ -512,9 +396,7 @@ void DIALOG_BOARD_REANNOTATE::ShowReport( const wxString& aMessage, SEVERITY aSe
wxStringTokenizer msgs( aMessage, wxT( "\n" ) );
while( msgs.HasMoreTokens() )
{
m_MessageWindow->Report( msgs.GetNextToken(), aSeverity );
}
}
@ -523,12 +405,14 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
int i = 1;
wxString message;
message.Printf( _( "\n\nThere are %i types of reference designations\n"
"**********************************************************\n" ),
(int) m_refDesTypes.size() );
message.Printf( _( "<br/>There are %i reference designator prefixes in use<br/>"
"**********************************************************<br/>" ),
(int) m_refDesPrefixInfos.size() );
for( REFDES_TYPE_STR Type : m_refDesTypes ) // Show all the types of refdes
message += Type.RefDesType + ( 0 == ( i++ % 16 ) ? wxT( "\n" ) : wxS( " " ) );
for( const REFDES_PREFIX_INFO& info : m_refDesPrefixInfos ) // Show all the types of refdes
message += info.RefDesPrefix + ( ( i++ % 16 ) == 0 ? wxT( "<br/>" ) : wxS( " " ) );
message += wxT( "<br/>" );
if( !m_excludeArray.empty() )
{
@ -537,10 +421,10 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
for( wxString& exclude : m_excludeArray ) // Show the refdes we are excluding
excludes += exclude + wxS( " " );
message += wxString::Format( _( "\nExcluding: %s from reannotation\n\n" ), excludes );
message += wxString::Format( _( "Excluding: %s from reannotation<br/>" ), excludes );
}
message += _( "\n Change Array\n***********************\n" );
message += _( "<br/>Change Array\n***********************<br/>" );
for( const REFDES_CHANGE& change : m_changeArray )
{
@ -548,8 +432,7 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
change.OldRefDesString,
change.NewRefDes,
ActionMessage[change.Action],
UPDATE_REFDES != change.Action ? _( " will be ignored" )
: wxString( wxT( "" ) ) );
change.Action != UPDATE_REFDES ? _( "(will be ignored)" ) : wxString( "" ) );
}
ShowReport( message, RPT_SEVERITY_INFO );
@ -562,26 +445,23 @@ void DIALOG_BOARD_REANNOTATE::LogFootprints( const wxString& aMessage,
wxString message = aMessage;
if( aFootprints.empty() )
message += _( "\nNo footprints" );
message += _( "<br/>No footprints" );
else
{
int i = 1;
bool fpLocations = m_locationChoice->GetSelection() == 0;
message += wxString::Format( _( "\n*********** Sort on %s ***********" ),
fpLocations ? _( "Footprint Coordinates" )
: _( "Reference Designator Coordinates" ) );
if( m_locationChoice->GetSelection() == 0 )
message += _( "<br/>*********** Sort on Footprint Coordinates ***********" );
else
message += _( "<br/>*********** Sort on Reference Coordinates ***********" );
message += wxString::Format( _( "\nSort Code %d" ), m_sortCode );
for( const REFDES_INFO& mod : aFootprints )
for( const REFDES_INFO& fp : aFootprints )
{
message += wxString::Format( _( "\n%d %s UUID: [%s], X, Y: %s, Rounded X, Y, %s" ),
message += wxString::Format( _( "<br/>%d %s X, Y: %s; rounded X, Y: %s" ),
i++,
mod.RefDesString,
mod.Uuid.AsString(),
CoordTowxString( mod.x, mod.y ),
CoordTowxString( mod.roundedx, mod.roundedy ) );
fp.RefDesString,
CoordTowxString( fp.x, fp.y ),
CoordTowxString( fp.roundedx, fp.roundedy ) );
}
}
@ -606,14 +486,13 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard()
if( !BadRefDes.empty() )
{
message.Printf( _( "\nPCB has %d empty or invalid reference designations."
"\nRecommend running DRC with 'Test for parity between PCB and "
"schematic' checked.\n" ),
message.Printf( _( "<br/>PCB has %d empty or invalid reference designations."
"<br/>Recommend running DRC with 'Test for parity between PCB and schematic' checked.\n" ),
(int) BadRefDes.size() );
for( const REFDES_INFO& mod : BadRefDes )
{
badrefdes += wxString::Format( _( "\nRefDes: %s Footprint: %s:%s at %s on PCB." ),
badrefdes += wxString::Format( _( "<br/>RefDes: %s Footprint: %s:%s at %s on PCB." ),
mod.RefDesString,
mod.FPID.GetLibNickname().wx_str(),
mod.FPID.GetLibItemName().wx_str(),
@ -649,8 +528,8 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard()
bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBadRefDes )
{
bool annotateSelected = m_AnnotateSelection->GetValue();
bool annotateFront = m_AnnotateFront->GetValue(); // Unless only doing back
bool annotateBack = m_AnnotateBack->GetValue(); // Unless only doing front
bool annotateFront = m_AnnotateFront->GetValue();
bool annotateBack = m_AnnotateBack->GetValue();
bool skipLocked = m_ExcludeLocked->GetValue();
int errorcount = 0;
@ -661,46 +540,22 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBad
m_excludeArray.clear();
m_footprints = m_frame->GetBoard()->Footprints();
std::vector<KIID> selected;
wxStringTokenizer tokenizer( m_ExcludeList->GetValue(), wxS( " ," ), wxTOKEN_STRTOK );
if( annotateSelected )
{
for( EDA_ITEM* item : m_selection )
{
// Get the timestamps of selected footprints
if( item->Type() == PCB_FOOTPRINT_T )
selected.push_back( item->m_Uuid );
}
}
wxString exclude;
// Break exclude list into words.
for( auto thischar : m_ExcludeList->GetValue() )
{
if( ( ' ' == thischar ) || ( ',' == thischar ) )
{
m_excludeArray.push_back( exclude );
exclude.clear();
}
else
exclude += thischar;
}
if( !exclude.empty() ) // last item to exclude
m_excludeArray.push_back( exclude );
while( tokenizer.HasMoreTokens() )
m_excludeArray.push_back( tokenizer.GetNextToken() );
REFDES_INFO fpData;
bool useModuleLocation = m_locationChoice->GetSelection() == 0;
bool useFPLocation = m_locationChoice->GetSelection() == 0;
for( FOOTPRINT* footprint : m_footprints )
{
fpData.Uuid = footprint->m_Uuid;
fpData.RefDesString = footprint->GetReference();
fpData.FPID = footprint->GetFPID();
fpData.x = useModuleLocation ? footprint->GetPosition().x
fpData.x = useFPLocation ? footprint->GetPosition().x
: footprint->Reference().GetPosition().x;
fpData.y = useModuleLocation ? footprint->GetPosition().y
fpData.y = useFPLocation ? footprint->GetPosition().y
: footprint->Reference().GetPosition().y;
fpData.roundedx = RoundToGrid( fpData.x, m_sortGridx ); // Round to sort
fpData.roundedy = RoundToGrid( fpData.y, m_sortGridy );
@ -720,37 +575,25 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBad
}
// Get the type (R, C, etc)
fpData.RefDesType = fpData.RefDesString.substr( 0, firstnum );
fpData.RefDesPrefix = fpData.RefDesString.substr( 0, firstnum );
for( const wxString& excluded : m_excludeArray )
{
if( excluded == fpData.RefDesType ) // Am I supposed to exclude this type?
if( excluded == fpData.RefDesPrefix ) // Am I supposed to exclude this type?
{
fpData.Action = EXCLUDE_REFDES; // Yes
break;
}
}
if(( fpData.Front && annotateBack ) || // If a front fp and doing backs only
( !fpData.Front && annotateFront ) || // If a back fp and doing front only
( footprint->IsLocked() && skipLocked ) ) // If excluding locked and it is locked
{
if( footprint->IsLocked() && skipLocked )
fpData.Action = EXCLUDE_REFDES;
}
if( annotateSelected )
{ // If only annotating selected c
fpData.Action = EXCLUDE_REFDES; // Assume it isn't selected
for( const KIID& sel : selected )
{
if( fpData.Uuid == sel )
{ // Found in selected footprints
fpData.Action = UPDATE_REFDES; // Update it
break;
}
}
}
else if( annotateSelected )
fpData.Action = footprint->IsSelected() ? UPDATE_REFDES : EXCLUDE_REFDES;
else if( annotateFront )
fpData.Action = fpData.Front ? UPDATE_REFDES : EXCLUDE_REFDES;
else if( annotateBack )
fpData.Action = fpData.Front ? EXCLUDE_REFDES : UPDATE_REFDES;
if( fpData.Front )
m_frontFootprints.push_back( fpData );
@ -762,15 +605,15 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBad
SetSortCodes( FrontDirectionsArray, m_sortCode );
// Sort the front footprints.
sort( m_frontFootprints.begin(), m_frontFootprints.end(), ModuleCompare );
sort( m_frontFootprints.begin(), m_frontFootprints.end(), FootprintCompare );
// Determine the sort order for the back.
SetSortCodes( BackDirectionsArray, m_sortCode );
// Sort the back footprints.
sort( m_backFootprints.begin(), m_backFootprints.end(), ModuleCompare );
sort( m_backFootprints.begin(), m_backFootprints.end(), FootprintCompare );
m_refDesTypes.clear();
m_refDesPrefixInfos.clear();
m_changeArray.clear();
BuildUnavailableRefsList();
@ -796,15 +639,13 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBad
for( size_t i = 0; i < changearraysize; i++ ) // Scan through for duplicates if update or skip
{
if( ( m_changeArray[i].Action != EMPTY_REFDES )
&& ( m_changeArray[i].Action != INVALID_REFDES ) )
if( m_changeArray[i].Action != EMPTY_REFDES && m_changeArray[i].Action != INVALID_REFDES )
{
for( size_t j = i + 1; j < changearraysize; j++ )
{
if( m_changeArray[i].NewRefDes == m_changeArray[j].NewRefDes )
{
ShowReport( wxString::Format( _( "Duplicate instances of %s" ),
m_changeArray[j].NewRefDes ),
ShowReport( wxString::Format( _( "Duplicate instances of %s" ), m_changeArray[j].NewRefDes ),
RPT_SEVERITY_ERROR );
if( errorcount++ > MAXERROR )
@ -820,7 +661,7 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<REFDES_INFO>& aBad
break;
}
return ( 0 == errorcount );
return ( errorcount == 0 );
}
void DIALOG_BOARD_REANNOTATE::BuildUnavailableRefsList()
@ -843,7 +684,7 @@ void DIALOG_BOARD_REANNOTATE::BuildUnavailableRefsList()
{
if( fpData.Action == EXCLUDE_REFDES )
{
REFDES_TYPE_STR* refDesInfo = GetOrBuildRefDesInfo( fpData.RefDesType );
REFDES_PREFIX_INFO* refDesInfo = GetOrBuildRefDesInfo( fpData.RefDesPrefix );
refDesInfo->UnavailableRefs.insert( UTIL::GetRefDesNumber( fpData.RefDesString ) );
}
}
@ -863,17 +704,16 @@ void DIALOG_BOARD_REANNOTATE::BuildChangeArray( std::vector<REFDES_INFO>& aFootp
bool prefixpresent; // Prefix found
wxString logstring = ( aFootprints.front().Front ) ? _( "\n\nFront Footprints" )
: _( "\n\nBack Footprints" );
wxString logstring = ( aFootprints.front().Front ) ? _( "<br/><br/>Front Footprints" )
: _( "<br/><br/>Back Footprints" );
LogFootprints( logstring, aFootprints );
if( 0 != aStartRefDes ) // Initialize the change array if present
if( aStartRefDes != 0 ) // Initialize the change array if present
{
for( size_t i = 0; i < m_refDesTypes.size(); i++ )
m_refDesTypes[i].LastUsedRefDes = aStartRefDes;
for( size_t i = 0; i < m_refDesPrefixInfos.size(); i++ )
m_refDesPrefixInfos[i].LastUsedRefDes = aStartRefDes - 1;
}
for( REFDES_INFO fpData : aFootprints )
{
REFDES_CHANGE change;
@ -896,21 +736,21 @@ void DIALOG_BOARD_REANNOTATE::BuildChangeArray( std::vector<REFDES_INFO>& aFootp
if( change.Action == UPDATE_REFDES )
{
prefixpresent = ( fpData.RefDesType.find( aPrefix ) == 0 );
prefixpresent = ( fpData.RefDesPrefix.find( aPrefix ) == 0 );
if( addprefix && !prefixpresent )
fpData.RefDesType.insert( 0, aPrefix ); // Add prefix once only
fpData.RefDesPrefix.insert( 0, aPrefix ); // Add prefix once only
if( aRemovePrefix && prefixpresent ) // If there is a prefix remove it
fpData.RefDesType.erase( 0, prefixsize );
fpData.RefDesPrefix.erase( 0, prefixsize );
REFDES_TYPE_STR* refDesInfo = GetOrBuildRefDesInfo( fpData.RefDesType, aStartRefDes );
REFDES_PREFIX_INFO* refDesInfo = GetOrBuildRefDesInfo( fpData.RefDesPrefix, aStartRefDes );
unsigned int newRefDesNumber = refDesInfo->LastUsedRefDes + 1;
while( refDesInfo->UnavailableRefs.count( newRefDesNumber ) )
newRefDesNumber++;
change.NewRefDes = refDesInfo->RefDesType + std::to_string( newRefDesNumber );
change.NewRefDes = refDesInfo->RefDesPrefix + std::to_string( newRefDesNumber );
refDesInfo->LastUsedRefDes = newRefDesNumber;
}

View File

@ -80,16 +80,16 @@ struct REFDES_INFO
KIID Uuid;
bool Front; // True if on the front of the board
wxString RefDesString; // What its refdes is R1, C2
wxString RefDesType; // ie R, C, etc
wxString RefDesPrefix; // ie R, C, etc
int x, y; // The coordinates
int roundedx, roundedy; // The coordinates after rounding.
ACTION_CODE Action; // Used to skip (if #, etc)
LIB_ID FPID;
};
struct REFDES_TYPE_STR
struct REFDES_PREFIX_INFO
{
wxString RefDesType;
wxString RefDesPrefix;
unsigned int LastUsedRefDes;
std::set<unsigned int> UnavailableRefs;
};
@ -176,15 +176,12 @@ private:
/// @return the string
wxString CoordTowxString( int aX, int aY );
/// Make the text to summarize what is about to happen.
void MakeSampleText( wxString& aMessage );
/// Check to make sure the prefix (if there is one) is properly constructed.
void FilterPrefix( wxTextCtrl* aPrefix );
/// Get the structure representing the information currently held for aRefDesPrefix or create one
/// if it doesn't exist
REFDES_TYPE_STR* GetOrBuildRefDesInfo( const wxString& aRefDesPrefix, unsigned int aStartRefDes = 0 );
REFDES_PREFIX_INFO* GetOrBuildRefDesInfo( const wxString& aRefDesPrefix, int aStartRefDes = 1 );
PCB_EDIT_FRAME* m_frame;
FOOTPRINTS m_footprints;
@ -193,13 +190,12 @@ private:
std::vector<REFDES_CHANGE> m_changeArray;
std::vector<REFDES_INFO> m_frontFootprints;
std::vector<REFDES_INFO> m_backFootprints;
std::vector<REFDES_TYPE_STR> m_refDesTypes;
std::vector<REFDES_PREFIX_INFO> m_refDesPrefixInfos;
std::vector<wxString> m_excludeArray;
int m_sortCode;
int m_gridIndex;
int m_annotationScope;
int m_severity;
double m_sortGridx;
double m_sortGridy;
@ -207,10 +203,6 @@ private:
wxString m_frontPrefixString;
wxString m_backPrefixString;
wxString m_validPrefixes;
APP_SETTINGS_BASE* m_settings;
APP_SETTINGS_BASE* m_Config;
};
#endif /* DIALOG_BOARD_REANNOTATE_H */

View File

@ -18,292 +18,286 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx
wxBoxSizer* bmainSizer;
bmainSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bupperSizer;
bupperSizer = new wxBoxSizer( wxVERTICAL );
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_StandardOptions = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
wxBoxSizer* bSizerOpts;
bSizerOpts = new wxBoxSizer( wxVERTICAL );
wxStaticText* stOrderLabel;
stOrderLabel = new wxStaticText( m_StandardOptions, wxID_ANY, _("Footprint Order"), wxDefaultPosition, wxDefaultSize, 0 );
stOrderLabel = new wxStaticText( this, wxID_ANY, _("Footprint Order"), wxDefaultPosition, wxDefaultSize, 0 );
stOrderLabel->Wrap( -1 );
bSizerOpts->Add( stOrderLabel, 0, wxRIGHT|wxLEFT, 5 );
bSizerOpts->Add( stOrderLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline1 = new wxStaticLine( m_StandardOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerOpts->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 8 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerOpts->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxFlexGridSizer* fgSizerButtons;
fgSizerButtons = new wxFlexGridSizer( 2, 11, 0, 0 );
fgSizerButtons = new wxFlexGridSizer( 2, 23, 0, 0 );
fgSizerButtons->AddGrowableCol( 2 );
fgSizerButtons->AddGrowableCol( 5 );
fgSizerButtons->AddGrowableCol( 8 );
fgSizerButtons->AddGrowableCol( 11 );
fgSizerButtons->AddGrowableCol( 14 );
fgSizerButtons->AddGrowableCol( 17 );
fgSizerButtons->AddGrowableCol( 20 );
fgSizerButtons->SetFlexibleDirection( wxBOTH );
fgSizerButtons->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_Down_Right = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_Down_Right = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_Down_Right->SetValue( true );
fgSizerButtons->Add( m_Down_Right, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
fgSizerButtons->Add( m_Down_Right, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
reannotate_down_right_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_down_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_down_right_bitmap->SetToolTip( _("Horizontally: top left to bottom right") );
fgSizerButtons->Add( reannotate_down_right_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Right_Down = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Right_Down, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Right_Down = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Right_Down, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_right_down_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_right_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_right_down_bitmap->SetToolTip( _("Horizontally: top right to bottom left") );
fgSizerButtons->Add( reannotate_right_down_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Down_Left = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Down_Left, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Down_Left = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Down_Left, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_down_left_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_down_left_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_down_left_bitmap->SetToolTip( _("Horizontally: bottom left to top right") );
fgSizerButtons->Add( reannotate_down_left_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Left_Down = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Left_Down, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Left_Down = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Left_Down, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_left_down_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_left_down_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_left_down_bitmap->SetToolTip( _("Horizontally:: bottom right to top left") );
fgSizerButtons->Add( reannotate_left_down_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_Up_Right = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Up_Right, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
reannotate_up_right_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Up_Right = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Up_Right, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_up_right_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_up_right_bitmap->SetToolTip( _("Vertically: top left to bottom right") );
fgSizerButtons->Add( reannotate_up_right_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Right_Up = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Right_Up, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Right_Up = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Right_Up, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_right_up_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_right_up_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_right_up_bitmap->SetToolTip( _("Vertically: bottom left to top right") );
fgSizerButtons->Add( reannotate_right_up_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Up_Left = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Up_Left, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Up_Left = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Up_Left, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_up_left_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_up_left_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_up_left_bitmap->SetToolTip( _("Vertically: top right to bottom left") );
fgSizerButtons->Add( reannotate_up_left_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
fgSizerButtons->Add( 20, 0, 1, wxEXPAND, 5 );
fgSizerButtons->Add( 10, 0, 1, wxEXPAND, 5 );
m_Left_Up = new wxRadioButton( m_StandardOptions, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Left_Up, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_Left_Up = new wxRadioButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerButtons->Add( m_Left_Up, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
reannotate_left_up_bitmap = new wxStaticBitmap( m_StandardOptions, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_left_up_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), 0 );
reannotate_left_up_bitmap->SetToolTip( _("Vertically: bottom right to top left") );
fgSizerButtons->Add( reannotate_left_up_bitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bSizerOpts->Add( fgSizerButtons, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
bSizerOpts->Add( fgSizerButtons, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
wxFlexGridSizer* fgSizerLocations;
fgSizerLocations = new wxFlexGridSizer( 0, 2, 0, 0 );
fgSizerLocations->AddGrowableCol( 1 );
fgSizerLocations = new wxFlexGridSizer( 0, 4, 0, 0 );
fgSizerLocations->SetFlexibleDirection( wxBOTH );
fgSizerLocations->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText9 = new wxStaticText( m_StandardOptions, wxID_ANY, _("Based on location of:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9 = new wxStaticText( this, wxID_ANY, _("Based on location of:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 );
fgSizerLocations->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
fgSizerLocations->Add( m_staticText9, 0, wxALIGN_CENTER_VERTICAL, 5 );
wxString m_locationChoiceChoices[] = { _("Footprint"), _("Reference Designator") };
wxString m_locationChoiceChoices[] = { _("Footprint"), _("Reference") };
int m_locationChoiceNChoices = sizeof( m_locationChoiceChoices ) / sizeof( wxString );
m_locationChoice = new wxChoice( m_StandardOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_locationChoiceNChoices, m_locationChoiceChoices, 0 );
m_locationChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_locationChoiceNChoices, m_locationChoiceChoices, 0 );
m_locationChoice->SetSelection( 0 );
fgSizerLocations->Add( m_locationChoice, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
fgSizerLocations->Add( m_locationChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
m_SortGridText = new wxStaticText( m_StandardOptions, wxID_ANY, _("Round locations to:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SortGridText = new wxStaticText( this, wxID_ANY, _("Round locations to:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SortGridText->Wrap( -1 );
m_SortGridText->SetToolTip( _("Component position will be rounded\nto this grid before sorting.\nThis helps with misaligned parts.") );
fgSizerLocations->Add( m_SortGridText, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
fgSizerLocations->Add( m_SortGridText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 25 );
wxArrayString m_GridChoiceChoices;
m_GridChoice = new wxChoice( m_StandardOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridChoiceChoices, 0 );
m_GridChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridChoiceChoices, 0 );
m_GridChoice->SetSelection( 0 );
m_GridChoice->SetToolTip( _("Component position will be rounded\nto this grid before sorting.\nThis helps with misaligned parts.") );
m_GridChoice->SetMinSize( wxSize( 150,-1 ) );
fgSizerLocations->Add( m_GridChoice, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
fgSizerLocations->Add( m_GridChoice, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bSizerOpts->Add( fgSizerLocations, 0, wxEXPAND|wxALL, 10 );
wxStaticText* stScopeLabel;
stScopeLabel = new wxStaticText( m_StandardOptions, wxID_ANY, _("Reannotation Scope"), wxDefaultPosition, wxDefaultSize, 0 );
stScopeLabel = new wxStaticText( this, wxID_ANY, _("Reannotation Scope"), wxDefaultPosition, wxDefaultSize, 0 );
stScopeLabel->Wrap( -1 );
bSizerOpts->Add( stScopeLabel, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
bSizerOpts->Add( stScopeLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline2 = new wxStaticLine( m_StandardOptions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerOpts->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 8 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerOpts->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxFlexGridSizer* fgSizer6111;
fgSizer6111 = new wxFlexGridSizer( 0, 5, 0, 0 );
fgSizer6111->SetFlexibleDirection( wxVERTICAL );
fgSizer6111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE );
m_AnnotateAll = new wxRadioButton( m_StandardOptions, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_AnnotateAll = new wxRadioButton( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
m_AnnotateAll->SetValue( true );
fgSizer6111->Add( m_AnnotateAll, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_AnnotateFront = new wxRadioButton( m_StandardOptions, wxID_ANY, _("Front"), wxDefaultPosition, wxDefaultSize, 0 );
m_AnnotateFront = new wxRadioButton( this, wxID_ANY, _("Front"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6111->Add( m_AnnotateFront, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_AnnotateBack = new wxRadioButton( m_StandardOptions, wxID_ANY, _("Back"), wxDefaultPosition, wxDefaultSize, 0 );
m_AnnotateBack = new wxRadioButton( this, wxID_ANY, _("Back"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6111->Add( m_AnnotateBack, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_AnnotateSelection = new wxRadioButton( m_StandardOptions, wxID_ANY, _("Selection"), wxDefaultPosition, wxDefaultSize, 0 );
m_AnnotateSelection = new wxRadioButton( this, wxID_ANY, _("Selection"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer6111->Add( m_AnnotateSelection, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
bSizerOpts->Add( fgSizer6111, 0, wxBOTTOM|wxLEFT|wxEXPAND, 10 );
bSizerOpts->Add( fgSizer6111, 0, wxBOTTOM|wxLEFT, 5 );
m_ExcludeLocked = new wxCheckBox( this, wxID_ANY, _("Exclude locked footprints"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExcludeLocked->SetToolTip( _("Locked footprints will not be reannotated") );
bSizerOpts->Add( m_ExcludeLocked, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
wxBoxSizer* bSizerExclusions;
bSizerExclusions = new wxBoxSizer( wxHORIZONTAL );
m_ExcludeListText = new wxStaticText( this, wxID_ANY, _("Exclude references:"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExcludeListText->Wrap( -1 );
m_ExcludeListText->SetToolTip( _("Do not re-annotate this type \nof reference (R means R*)") );
bSizerExclusions->Add( m_ExcludeListText, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_ExcludeList = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerExclusions->Add( m_ExcludeList, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_StandardOptions->SetSizer( bSizerOpts );
m_StandardOptions->Layout();
bSizerOpts->Fit( m_StandardOptions );
m_notebook->AddPage( m_StandardOptions, _("Options"), true );
m_Advanced = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerDesignatorOpts;
bSizerDesignatorOpts = new wxBoxSizer( wxHORIZONTAL );
bSizerOpts->Add( bSizerExclusions, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticText10 = new wxStaticText( this, wxID_ANY, _("Reference Designators"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText10->Wrap( -1 );
bSizerOpts->Add( m_staticText10, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerOpts->Add( m_staticline3, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 0, 0 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->SetEmptyCellSize( wxSize( 20,10 ) );
gbSizer1->SetEmptyCellSize( wxSize( 40,10 ) );
m_FrontRefDesStartText = new wxStaticText( m_Advanced, wxID_ANY, _("Front reference start:"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontRefDesStartText = new wxStaticText( this, wxID_ANY, _("Front reference start:"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontRefDesStartText->Wrap( -1 );
m_FrontRefDesStartText->SetToolTip( _("Starting reference designation for front.") );
gbSizer1->Add( m_FrontRefDesStartText, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_FrontRefDesStart = new wxTextCtrl( m_Advanced, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontRefDesStart = new wxTextCtrl( this, wxID_ANY, _("1"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontRefDesStart->SetToolTip( _("Default is 1") );
m_FrontRefDesStart->SetMinSize( wxSize( 100,-1 ) );
gbSizer1->Add( m_FrontRefDesStart, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
m_BottomRefDesStartText = new wxStaticText( m_Advanced, wxID_ANY, _("Back reference start:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BottomRefDesStartText = new wxStaticText( this, wxID_ANY, _("Back reference start:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BottomRefDesStartText->Wrap( -1 );
m_BottomRefDesStartText->SetToolTip( _("Blank continues from front or enter a number greater than the highest reference designation on the front.") );
gbSizer1->Add( m_BottomRefDesStartText, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
m_BackRefDesStart = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_BackRefDesStart = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_BackRefDesStart->SetToolTip( _("Leave blank or zero, or enter a number greater than the highest reference designation on the front.") );
m_BackRefDesStart->SetMinSize( wxSize( 100,-1 ) );
gbSizer1->Add( m_BackRefDesStart, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
m_FrontPrefixText = new wxStaticText( m_Advanced, wxID_ANY, _("Front prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontPrefixText = new wxStaticText( this, wxID_ANY, _("Front prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
m_FrontPrefixText->Wrap( -1 );
m_FrontPrefixText->SetToolTip( _("Optional prefix for component side reference designations (e.g. F_)") );
gbSizer1->Add( m_FrontPrefixText, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_FrontPrefix = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FrontPrefix = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_FrontPrefix->SetToolTip( _("Optional prefix for component side reference designations (e.g. F_)") );
gbSizer1->Add( m_FrontPrefix, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_BackPrefixText = new wxStaticText( m_Advanced, wxID_ANY, _("Back prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BackPrefixText = new wxStaticText( this, wxID_ANY, _("Back prefix:"), wxDefaultPosition, wxDefaultSize, 0 );
m_BackPrefixText->Wrap( -1 );
m_BackPrefixText->SetToolTip( _("Optional prefix for solder side reference designations (e.g. B_)") );
gbSizer1->Add( m_BackPrefixText, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_BackPrefix = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_BackPrefix = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_BackPrefix->SetToolTip( _("Optional prefix for solder side reference designations (e.g. B_)") );
gbSizer1->Add( m_BackPrefix, wxGBPosition( 1, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_RemoveFrontPrefix = new wxCheckBox( m_Advanced, wxID_ANY, _("Remove front prefix"), wxDefaultPosition, wxDefaultSize, 0 );
m_RemoveFrontPrefix = new wxCheckBox( this, wxID_ANY, _("Remove front prefix"), wxDefaultPosition, wxDefaultSize, 0 );
m_RemoveFrontPrefix->SetToolTip( _("If checked will remove the front side prefix\nin the front prefix box if present") );
gbSizer1->Add( m_RemoveFrontPrefix, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_RemoveBackPrefix = new wxCheckBox( m_Advanced, wxID_ANY, _("Remove back prefix"), wxDefaultPosition, wxDefaultSize, 0 );
m_RemoveBackPrefix = new wxCheckBox( this, wxID_ANY, _("Remove back prefix"), wxDefaultPosition, wxDefaultSize, 0 );
m_RemoveBackPrefix->SetToolTip( _("If checked will remove the Back side prefix\nin the back prefix box if present") );
gbSizer1->Add( m_RemoveBackPrefix, wxGBPosition( 2, 3 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_ExcludeLocked = new wxCheckBox( m_Advanced, wxID_ANY, _("Exclude locked footprints"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExcludeLocked->SetToolTip( _("Locked footprints will not be reannotated") );
gbSizer1->Add( m_ExcludeLocked, wxGBPosition( 5, 0 ), wxGBSpan( 1, 5 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
m_ExcludeListText = new wxStaticText( m_Advanced, wxID_ANY, _("Exclude references:"), wxDefaultPosition, wxDefaultSize, 0 );
m_ExcludeListText->Wrap( -1 );
m_ExcludeListText->SetToolTip( _("Do not re-annotate this type \nof reference (R means R*)") );
gbSizer1->Add( m_ExcludeListText, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
m_ExcludeList = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_ExcludeList, wxGBPosition( 6, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
gbSizer1->AddGrowableCol( 1 );
gbSizer1->AddGrowableCol( 2 );
gbSizer1->AddGrowableCol( 3 );
gbSizer1->AddGrowableCol( 4 );
bSizerDesignatorOpts->Add( gbSizer1, 1, wxALL|wxEXPAND, 5 );
bSizerOpts->Add( gbSizer1, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_Advanced->SetSizer( bSizerDesignatorOpts );
m_Advanced->Layout();
bSizerDesignatorOpts->Fit( m_Advanced );
m_notebook->AddPage( m_Advanced, _("Reference Designators"), false );
bupperSizer->Add( m_notebook, 0, wxALL|wxEXPAND|wxLEFT|wxRIGHT, 5 );
bmainSizer->Add( bSizerOpts, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerMessages;
bSizerMessages = new wxBoxSizer( wxVERTICAL );
m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_MessageWindow->SetMinSize( wxSize( -1,150 ) );
m_MessageWindow->SetMinSize( wxSize( -1,300 ) );
bSizerMessages->Add( m_MessageWindow, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
bupperSizer->Add( bSizerMessages, 1, wxEXPAND|wxTOP, 15 );
bmainSizer->Add( bupperSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 6 );
bmainSizer->Add( bSizerMessages, 1, wxEXPAND|wxTOP, 15 );
wxBoxSizer* m_buttonsSizer;
m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );

View File

@ -65,137 +65,18 @@
<property name="name">bmainSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">6</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bupperSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxNotebook" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmapsize"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">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="drag_accept_files">0</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="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_notebook</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="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<object class="notebookpage" expanded="true">
<property name="bitmap"></property>
<property name="label">Options</property>
<property name="select">1</property>
<object class="wxPanel" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="close_button">0</property>
<property name="context_help"></property>
<property name="context_menu">0</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="drag_accept_files">0</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="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size">-1,-1</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_StandardOptions</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">0</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size">-1,-1</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizerOpts</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="border">13</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
@ -256,8 +137,8 @@
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">8</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="true">
<property name="BottomDockable">1</property>
@ -317,11 +198,11 @@
<object class="sizeritem" expanded="true">
<property name="border">10</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxFlexGridSizer" expanded="true">
<property name="cols">11</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="false">
<property name="cols">23</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">2,5,8</property>
<property name="growablecols">2,5,8,11,14,17,20</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
@ -332,7 +213,7 @@
<property name="vgap">0</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -461,12 +342,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -595,12 +476,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -729,12 +610,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -858,7 +739,17 @@
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -987,12 +878,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -1121,12 +1012,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -1255,12 +1146,12 @@
<object class="spacer" expanded="false">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxRadioButton" expanded="false">
<property name="BottomDockable">1</property>
@ -1389,9 +1280,9 @@
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="false">
<property name="cols">2</property>
<property name="cols">4</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1</property>
<property name="growablecols"></property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
@ -1402,7 +1293,7 @@
<property name="vgap">0</property>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
@ -1464,7 +1355,7 @@
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property>
@ -1480,7 +1371,7 @@
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="choices">&quot;Footprint&quot; &quot;Reference Designator&quot;</property>
<property name="choices">&quot;Footprint&quot; &quot;Reference&quot;</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
@ -1528,8 +1419,8 @@
</object>
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT</property>
<property name="border">25</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
@ -1591,7 +1482,7 @@
</object>
<object class="sizeritem" expanded="false">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxLEFT</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxChoice" expanded="false">
<property name="BottomDockable">1</property>
@ -1628,7 +1519,7 @@
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">150,-1</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_GridChoice</property>
<property name="pane_border">1</property>
@ -1657,7 +1548,7 @@
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="border">13</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
@ -1719,8 +1610,8 @@
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">8</property>
<property name="flag">wxEXPAND|wxBOTTOM</property>
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="true">
<property name="BottomDockable">1</property>
@ -1778,8 +1669,8 @@
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">10</property>
<property name="flag">wxBOTTOM|wxLEFT|wxEXPAND</property>
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxFlexGridSizer" expanded="true">
<property name="cols">5</property>
@ -2055,14 +1946,85 @@
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">10</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="drag_accept_files">0</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">Exclude locked footprints</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_ExcludeLocked</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">Locked footprints will not be reannotated</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 class="notebookpage" expanded="true">
<property name="bitmap"></property>
<property name="label">Reference Designators</property>
<property name="select">0</property>
<object class="wxPanel" expanded="true">
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizerExclusions</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
@ -2078,7 +2040,198 @@
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">0</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="drag_accept_files">0</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">Exclude references:</property>
<property name="markup">0</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">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_ExcludeListText</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">Do not re-annotate this type &#x0A;of reference (R means R*)</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">1</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="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="drag_accept_files">0</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="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_ExcludeList</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_ALPHA</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">13</property>
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticText" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="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="drag_accept_files">0</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">Reference Designators</property>
<property name="markup">0</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_staticText10</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="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property>
<object class="wxStaticLine" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="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>
@ -2098,7 +2251,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_Advanced</property>
<property name="name">m_staticline3</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -2108,25 +2261,23 @@
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style">wxLI_HORIZONTAL</property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style">wxTAB_TRAVERSAL</property>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bSizerDesignatorOpts</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<property name="window_style"></property>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">1</property>
<object class="wxGridBagSizer" expanded="true">
<property name="empty_cell_size">20,10</property>
<property name="empty_cell_size">40,10</property>
<property name="flexible_direction">wxBOTH</property>
<property name="growablecols">1,2,3,4</property>
<property name="growablecols">1,4</property>
<property name="growablerows"></property>
<property name="hgap">0</property>
<property name="minimum_size"></property>
@ -2804,210 +2955,6 @@
<property name="window_style"></property>
</object>
</object>
<object class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">5</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL</property>
<property name="row">5</property>
<property name="rowspan">1</property>
<object class="wxCheckBox" expanded="true">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="drag_accept_files">0</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">Exclude locked footprints</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_ExcludeLocked</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">Locked footprints will not be reannotated</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 class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">1</property>
<property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="row">6</property>
<property name="rowspan">1</property>
<object class="wxStaticText" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="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="drag_accept_files">0</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">Exclude references:</property>
<property name="markup">0</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">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_ExcludeListText</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">Do not re-annotate this type &#x0A;of reference (R means R*)</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<property name="wrap">-1</property>
</object>
</object>
<object class="gbsizeritem" expanded="true">
<property name="border">5</property>
<property name="colspan">4</property>
<property name="column">1</property>
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</property>
<property name="row">6</property>
<property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="false">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer">0</property>
<property name="aui_name"></property>
<property name="aui_position">0</property>
<property name="aui_row">0</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="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="drag_accept_files">0</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="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="maxlength">0</property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,-1</property>
<property name="moveable">1</property>
<property name="name">m_ExcludeList</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_ALPHA</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="value"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
@ -3059,7 +3006,7 @@
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size">-1,150</property>
<property name="minimum_size">-1,300</property>
<property name="moveable">1</property>
<property name="name">m_MessageWindow</property>
<property name="pane_border">1</property>
@ -3081,8 +3028,6 @@
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="true">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT</property>

View File

@ -27,12 +27,11 @@ class WX_HTML_REPORT_PANEL;
#include <wx/statbmp.h>
#include <wx/sizer.h>
#include <wx/choice.h>
#include <wx/panel.h>
#include <wx/checkbox.h>
#include <wx/textctrl.h>
#include <wx/valgen.h>
#include <wx/checkbox.h>
#include <wx/gbsizer.h>
#include <wx/notebook.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/dialog.h>
@ -46,8 +45,6 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM
private:
protected:
wxNotebook* m_notebook;
wxPanel* m_StandardOptions;
wxStaticLine* m_staticline1;
wxRadioButton* m_Down_Right;
wxStaticBitmap* reannotate_down_right_bitmap;
@ -74,7 +71,11 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM
wxRadioButton* m_AnnotateFront;
wxRadioButton* m_AnnotateBack;
wxRadioButton* m_AnnotateSelection;
wxPanel* m_Advanced;
wxCheckBox* m_ExcludeLocked;
wxStaticText* m_ExcludeListText;
wxTextCtrl* m_ExcludeList;
wxStaticText* m_staticText10;
wxStaticLine* m_staticline3;
wxStaticText* m_FrontRefDesStartText;
wxTextCtrl* m_FrontRefDesStart;
wxStaticText* m_BottomRefDesStartText;
@ -85,9 +86,6 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM
wxTextCtrl* m_BackPrefix;
wxCheckBox* m_RemoveFrontPrefix;
wxCheckBox* m_RemoveBackPrefix;
wxCheckBox* m_ExcludeLocked;
wxStaticText* m_ExcludeListText;
wxTextCtrl* m_ExcludeList;
WX_HTML_REPORT_PANEL* m_MessageWindow;
wxStdDialogButtonSizer* m_sdbSizer;
wxButton* m_sdbSizerOK;

View File

@ -1275,6 +1275,7 @@ void DIALOG_DRC::OnDeleteAllClick( wxCommandEvent& aEvent )
}
deleteAllMarkers( s_includeExclusions );
m_drcRun = false;
refreshEditor();
updateDisplayedCounts();

View File

@ -878,7 +878,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintGroup( FOOTPRINT* aPcbFootprint,
EscapeHTML( existingGroup->GetName() ) );
changed = true;
m_commit.Modify( existingGroup );
m_commit.Modify( existingGroup, nullptr, RECURSE_MODE::NO_RECURSE );
existingGroup->RemoveItem( aPcbFootprint );
}
@ -915,7 +915,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintGroup( FOOTPRINT* aPcbFootprint,
}
else
{
m_commit.Modify( newGroup->AsEdaItem() );
m_commit.Modify( newGroup->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
}
newGroup->AddItem( aPcbFootprint );
@ -1385,7 +1385,7 @@ bool BOARD_NETLIST_UPDATER::updateGroups( NETLIST& aNetlist )
wxString msg;
msg.Printf( _( "Changed group name to '%s' to '%s'." ), EscapeHTML( pcbGroup->GetName() ),
EscapeHTML( netlistGroup->name ) );
m_commit.Modify( pcbGroup->AsEdaItem() );
m_commit.Modify( pcbGroup->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
pcbGroup->SetName( netlistGroup->name );
}
}
@ -1404,7 +1404,7 @@ bool BOARD_NETLIST_UPDATER::updateGroups( NETLIST& aNetlist )
wxString msg;
msg.Printf( _( "Changed group library link to '%s'." ),
EscapeHTML( netlistGroup->libId.GetUniStringLibId() ) );
m_commit.Modify( pcbGroup->AsEdaItem() );
m_commit.Modify( pcbGroup->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
pcbGroup->SetDesignBlockLibId( netlistGroup->libId );
}
}

View File

@ -435,7 +435,7 @@ bool PCB_EDIT_FRAME::SaveSelectionToDesignBlock( const LIB_ID& aLibId )
{
BOARD_COMMIT commit( m_toolManager );
commit.Modify( group );
commit.Modify( group, nullptr, RECURSE_MODE::NO_RECURSE );
group->SetDesignBlockLibId( aLibId );
commit.Push( "Set Group Design Block Link" );

View File

@ -2311,7 +2311,7 @@ void PCB_EDIT_FRAME::ExchangeFootprint( FOOTPRINT* aExisting, FOOTPRINT* aNew,
if( parentGroup )
{
aCommit.Modify( parentGroup->AsEdaItem() );
aCommit.Modify( parentGroup->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
parentGroup->RemoveItem( aExisting );
parentGroup->AddItem( aNew );
}

View File

@ -58,7 +58,7 @@ PCB_GENERATOR* PCB_GENERATOR::DeepClone() const
void PCB_GENERATOR::EditStart( GENERATOR_TOOL* aTool, BOARD* aBoard, BOARD_COMMIT* aCommit )
{
aCommit->Modify( this );
aCommit->Modify( this, nullptr, RECURSE_MODE::NO_RECURSE );
}

View File

@ -586,8 +586,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
&m_Reannotate.sort_code, 0 ) );
m_params.emplace_back( new PARAM<int>( "reannotate_dialog.annotate_choice",
&m_Reannotate.annotation_choice, 0 ) );
m_params.emplace_back( new PARAM<int>( "reannotate_dialog.annotate_report_severity",
&m_Reannotate.report_severity, 0 ) );
m_params.emplace_back( new PARAM<wxString>( "reannotate_dialog.annotate_front_refdes_start",
&m_Reannotate.front_refdes_start, "1" ) );

View File

@ -315,7 +315,6 @@ public:
int grid_index;
int sort_code;
int annotation_choice;
int report_severity;
wxString front_refdes_start;
wxString back_refdes_start;
wxString front_prefix;

View File

@ -627,7 +627,14 @@ void PlotStandardLayer( BOARD* aBoard, PLOTTER* aPlotter, const LSET& aLayerMask
&& ( ( onFrontFab && footprint->GetLayer() == F_Cu )
|| ( onBackFab && footprint->GetLayer() == B_Cu ) ) )
{
BOX2I rect = footprint->GetBoundingHull().BBox();
BOX2I rect;
const SHAPE_POLY_SET& courtyard = footprint->GetCourtyard( footprint->GetLayer() );
if( courtyard.IsEmpty() )
rect = footprint->GetEffectiveShape()->BBox();
else
rect = courtyard.BBox();
int width = aBoard->GetDesignSettings().m_LineThickness[ LAYER_CLASS_FAB ];
aPlotter->ThickSegment( rect.GetOrigin(), rect.GetEnd(), width, nullptr );

View File

@ -202,7 +202,7 @@ void ARRAY_TOOL::onDialogClosed( wxCloseEvent& aEvent )
if( item == nullptr )
break;
commit.Modify( item );
commit.Modify( item, nullptr, RECURSE_MODE::RECURSE );
// Transform is a relative move, so when arranging the transform needs to start from
// the same point for each item, e.g. the first item's position
@ -263,7 +263,7 @@ void ARRAY_TOOL::onDialogClosed( wxCloseEvent& aEvent )
// we might still modify it (position or label)
this_item = item;
commit.Modify( this_item );
commit.Modify( this_item, nullptr, RECURSE_MODE::RECURSE );
TransformItem( *m_array_opts, arraySize - 1, *this_item );
}

View File

@ -2190,6 +2190,7 @@ const std::vector<KICAD_T> EDIT_TOOL::MirrorableItems = {
PCB_TRACE_T,
PCB_ARC_T,
PCB_VIA_T,
PCB_GROUP_T,
PCB_GENERATOR_T,
};
@ -2251,7 +2252,7 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
continue;
if( !item->IsNew() && !item->IsMoving() )
commit->Modify( item );
commit->Modify( item, nullptr, RECURSE_MODE::RECURSE );
// modify each object as necessary
switch( item->Type() )
@ -2287,6 +2288,10 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
static_cast<PCB_TRACK*>( item )->Mirror( mirrorPoint, flipDirection );
break;
case PCB_GROUP_T:
static_cast<PCB_GROUP*>( item )->Mirror( mirrorPoint, flipDirection );
break;
case PCB_GENERATOR_T:
static_cast<PCB_GENERATOR*>( item )->Mirror( mirrorPoint, flipDirection );
break;

View File

@ -194,11 +194,11 @@ int EDIT_TOOL::PackAndMoveFootprints( const TOOL_EVENT& aEvent )
BOX2I footprintsBbox;
for( FOOTPRINT* item : footprintsToPack )
for( FOOTPRINT* fp : footprintsToPack )
{
commit.Modify( item );
item->SetFlags( IS_MOVING );
footprintsBbox.Merge( item->GetBoundingBox( false ) );
commit.Modify( fp );
fp->SetFlags( IS_MOVING );
footprintsBbox.Merge( fp->GetBoundingBox( false ) );
}
SpreadFootprints( &footprintsToPack, footprintsBbox.Normalize().GetOrigin(), false );
@ -582,13 +582,9 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit
m_toolMgr->RunSynchronousAction( PCB_ACTIONS::genStartEdit, aCommit,
static_cast<PCB_GENERATOR*>( item ) );
}
else if( item->Type() == PCB_GROUP_T || item->Type() == PCB_GENERATOR_T )
{
aCommit->Modify( item, nullptr, RECURSE_MODE::RECURSE );
}
else
{
aCommit->Modify( item );
aCommit->Modify( item, nullptr, RECURSE_MODE::RECURSE );
}
item->SetFlags( IS_MOVING );
@ -762,7 +758,7 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit
updateStatusPopup( nextItem, itemIdx + 1, orig_items.size() );
// Pick up new item
aCommit->Modify( nextItem );
aCommit->Modify( nextItem, nullptr, RECURSE_MODE::RECURSE );
nextItem->Move( controls->GetCursorPosition( true ) - nextItem->GetPosition() );
continue;

View File

@ -1546,7 +1546,7 @@ bool PCB_CONTROL::placeBoardItems( BOARD_COMMIT* aCommit, std::vector<BOARD_ITEM
{
if( item->IsGroupableType() && !item->GetParentGroup() )
{
aCommit->Modify( enteredGroup );
aCommit->Modify( enteredGroup, nullptr, RECURSE_MODE::NO_RECURSE );
enteredGroup->AddItem( item );
}
}

View File

@ -176,6 +176,9 @@ int PCB_GROUP_TOOL::Group( const TOOL_EVENT& aEvent )
{
if( eda_item->IsBOARD_ITEM() )
{
if( EDA_GROUP* existingGroup = eda_item->GetParentGroup() )
m_commit->Modify( existingGroup->AsEdaItem(), nullptr, RECURSE_MODE::NO_RECURSE );
m_commit->Modify( eda_item );
group->AddItem( eda_item );
}

View File

@ -233,7 +233,7 @@ void PCB_PROPERTIES_PANEL::valueChanged( wxPropertyGridEvent& aEvent )
continue;
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( edaItem );
changes.Modify( item );
changes.Modify( item, nullptr, RECURSE_MODE::NO_RECURSE );
item->Set( property, newValue );
}