diff --git a/pcbnew/dialogs/dialog_board_reannotate.cpp b/pcbnew/dialogs/dialog_board_reannotate.cpp index 51cbc6e86b..c4981cc3b6 100644 --- a/pcbnew/dialogs/dialog_board_reannotate.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate.cpp @@ -180,31 +180,30 @@ DIALOG_BOARD_REANNOTATE::~DIALOG_BOARD_REANNOTATE() { GetParameters(); //Get the current menu settings PCBNEW_SETTINGS* cfg = m_frame->GetPcbNewSettings(); - cfg->m_Reannotate.sort_on_modules = m_SortOnModules->GetValue(); - cfg->m_Reannotate.remove_front_prefix = m_RemoveFrontPrefix->GetValue(); - cfg->m_Reannotate.remove_back_prefix = m_RemoveBackPrefix->GetValue(); - cfg->m_Reannotate.update_schematic = m_UpdateSchematic->GetValue(); - cfg->m_Reannotate.exclude_locked = m_ExcludeLocked->GetValue(); + cfg->m_Reannotate.sort_on_module_location = m_locationChoice->GetSelection() == 0; + cfg->m_Reannotate.remove_front_prefix = m_RemoveFrontPrefix->GetValue(); + cfg->m_Reannotate.remove_back_prefix = m_RemoveBackPrefix->GetValue(); + cfg->m_Reannotate.update_schematic = m_UpdateSchematic->GetValue(); + cfg->m_Reannotate.exclude_locked = m_ExcludeLocked->GetValue(); - cfg->m_Reannotate.grid_index = m_GridIndex; - cfg->m_Reannotate.sort_code = m_SortCode; - cfg->m_Reannotate.annotation_choice = m_AnnotationChoice; - cfg->m_Reannotate.report_severity = m_Severity; + cfg->m_Reannotate.grid_index = m_GridIndex; + cfg->m_Reannotate.sort_code = m_SortCode; + cfg->m_Reannotate.annotation_choice = m_AnnotationChoice; + 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(); - cfg->m_Reannotate.front_prefix = m_FrontPrefix->GetValue(); - cfg->m_Reannotate.back_prefix = m_BackPrefix->GetValue(); - cfg->m_Reannotate.exclude_list = m_ExcludeList->GetValue(); - cfg->m_Reannotate.report_file_name = m_MessageWindow->GetFileName(); + cfg->m_Reannotate.front_refdes_start = m_FrontRefDesStart->GetValue(); + cfg->m_Reannotate.back_refdes_start = m_BackRefDesStart->GetValue(); + cfg->m_Reannotate.front_prefix = m_FrontPrefix->GetValue(); + cfg->m_Reannotate.back_prefix = m_BackPrefix->GetValue(); + cfg->m_Reannotate.exclude_list = m_ExcludeList->GetValue(); + cfg->m_Reannotate.report_file_name = m_MessageWindow->GetFileName(); } /// Copy saved app settings to the dialog void DIALOG_BOARD_REANNOTATE::InitValues( void ) { PCBNEW_SETTINGS* cfg = m_frame->GetPcbNewSettings(); - m_SortOnModules->SetValue( cfg->m_Reannotate.sort_on_modules ); - m_SortOnReference->SetValue( !cfg->m_Reannotate.sort_on_modules ); + m_locationChoice->SetSelection( cfg->m_Reannotate.sort_on_module_location ? 0 : 1 ); m_RemoveFrontPrefix->SetValue( cfg->m_Reannotate.remove_front_prefix ); m_RemoveBackPrefix->SetValue( cfg->m_Reannotate.remove_back_prefix ); m_UpdateSchematic->SetValue( cfg->m_Reannotate.update_schematic ); @@ -298,59 +297,74 @@ void DIALOG_BOARD_REANNOTATE::MakeSampleText( wxString& aMessage ) { wxString tmp; - aMessage.Printf( _( "\n%s components will be reannotated. " ), + aMessage.Printf( _( "\n%s footprints will be reannotated. " ), _( AnnotateString[m_AnnotationChoice] ) ); 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 components will start at %s" ), + { + 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 components will start at %s." ), - frontPlusOne ? _( "the last front component + 1" ) : + 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 components starting with %s will have the prefix removed." ), - m_FrontPrefix->GetValue() ); + { + aMessage += wxString::Format( _( "\nFront footprints starting with '%s' will have " + "the prefix removed." ), + m_FrontPrefix->GetValue() ); + } else - aMessage += - wxString::Format( _( "\nFront components will have %s inserted as a prefix." ), - m_FrontPrefix->GetValue() ); + { + 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 components starting with %s will have the prefix removed." ), - m_BackPrefix->GetValue() ); + { + aMessage += wxString::Format( _( "\nBack footprints starting with '%s' will have the " + "prefix removed." ), + m_BackPrefix->GetValue() ); + } else - aMessage += - wxString::Format( _( "\nBack components will have %s inserted as a prefix." ), - m_BackPrefix->GetValue() ); + { + aMessage += wxString::Format( _( "\nBack footprints will have '%s' inserted as a " + "prefix." ), + m_BackPrefix->GetValue() ); + } } - aMessage += wxString::Format( - _( "\nPrior to sorting by %s, the coordinates of which will be rounded to a %s, %s grid. " ), - ( m_SortOnModules->GetValue() ? _( "footprints" ) : _( "references" ) ), - MessageTextFromValue( m_Units, m_SortGridx, false ), - MessageTextFromValue( m_Units, m_SortGridy, false ) ); + bool moduleLocation = m_locationChoice->GetSelection() == 0; + + aMessage += wxString::Format( _( "\nPrior to sorting by %s, the coordinates of which will be " + "rounded to a %s, %s grid. " ), + moduleLocation ? _( "footprint location" ) + : _( "reference designator location" ), + MessageTextFromValue( m_Units, m_SortGridx, false ), + MessageTextFromValue( m_Units, m_SortGridy, false ) ); if( m_UpdateSchematic->GetValue() ) aMessage += _( "\nThe schematic will be updated." ); @@ -545,18 +559,22 @@ void DIALOG_BOARD_REANNOTATE::LogModules( wxString& aMessage, std::vectorGetSelection() == 0; - message += wxString::Format( - _( "\n*********** Sort on " ) - + ( std::string )( m_SortOnModules->GetValue() ? _( "Module" ) : _( "Reference" ) ) - + _( " Coordinates *******************" ) + _( "\nSort Code " ) - + std::to_string( m_SortCode ) ); + message += wxString::Format( _( "\n*********** Sort on %s ***********" ), + moduleLocations ? _( "Footprint Coordinates" ) + : _( "Reference Designator Coordinates" ) ); - for( RefDesInfo mod : aModules ) + message += wxString::Format( _( "\nSort Code %d" ), m_SortCode ); + + for( const RefDesInfo& mod : aModules ) { message += wxString::Format( _( "\n%d %s Uuid: [%s], X, Y: %s, Rounded X, Y, %s" ), - i++, mod.RefDesString, mod.Uuid.AsString(), CoordTowxString( mod.x, mod.y ), - CoordTowxString( mod.roundedx, mod.roundedy ) ); + i++, + mod.RefDesString, + mod.Uuid.AsString(), + CoordTowxString( mod.x, mod.y ), + CoordTowxString( mod.roundedx, mod.roundedy ) ); } } @@ -585,19 +603,21 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard() if( !BadRefDes.empty() ) { message.Printf( - _( "\nPCB has %d empty or invalid reference designations " - "\nRecommend you run DRC with Test footprints against schematic checked.\n" ), + _( "\nPCB has %d empty or invalid reference designations." + "\nRecommend you run DRC with 'Test footprints against schematic' checked.\n" ), (int) BadRefDes.size() ); - for( RefDesInfo mod : BadRefDes ) + for( const RefDesInfo& mod : BadRefDes ) { - badrefdes += _( "\nRefdes: \"" ) + mod.RefDesString + _( "\" Module:" ) - + mod.FPID.GetLibNickname() + ":" + mod.FPID.GetLibItemName(); - badrefdes += "at X, Y " + CoordTowxString( mod.x, mod.y ) + _( " on PCB " ); + badrefdes += wxString::Format( _( "\nRefDes: %s Module: %s:%s at %s on PCB." ), + mod.RefDesString, + mod.FPID.GetLibNickname().wx_str(), + mod.FPID.GetLibItemName().wx_str(), + CoordTowxString( mod.x, mod.y ) ); } ShowReport( message + badrefdes + "\n", RPT_SEVERITY_WARNING ); - message += _( "Yes will attempt reannotate. Proceed?" ); + message += _( "Reannotate anyway?" ); if( !IsOK( m_frame, message ) ) return ( false ); @@ -712,16 +732,17 @@ bool DIALOG_BOARD_REANNOTATE::BuildModuleList( std::vector& aBadRefD } RefDesInfo thismodule; + bool useModuleLocation = m_locationChoice->GetSelection() == 0; for( MODULE* mod : m_modules ) { thismodule.Uuid = mod->m_Uuid; thismodule.RefDesString = mod->GetReference(); thismodule.FPID = mod->GetFPID(); - thismodule.x = m_SortOnModules->GetValue() ? mod->GetPosition().x : - mod->Reference().GetPosition().x; - thismodule.y = m_SortOnModules->GetValue() ? mod->GetPosition().y : - mod->Reference().GetPosition().y; + thismodule.x = useModuleLocation ? mod->GetPosition().x + : mod->Reference().GetPosition().x; + thismodule.y = useModuleLocation ? mod->GetPosition().y + : mod->Reference().GetPosition().y; thismodule.roundedx = RoundToGrid( thismodule.x, m_SortGridx ); //Round to sort thismodule.roundedy = RoundToGrid( thismodule.y, m_SortGridy ); thismodule.Front = mod->GetLayer() == F_Cu; diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.cpp b/pcbnew/dialogs/dialog_board_reannotate_base.cpp index a2dd3faa02..8fd4508691 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.cpp +++ b/pcbnew/dialogs/dialog_board_reannotate_base.cpp @@ -27,7 +27,7 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx bSizer4 = new wxBoxSizer( wxVERTICAL ); wxStaticBoxSizer* sbSizer3; - sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_StandardOptions, wxID_ANY, _("Sorting") ), wxHORIZONTAL ); + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_StandardOptions, wxID_ANY, _("Footprint Order") ), wxVERTICAL ); wxFlexGridSizer* fgSizer5; fgSizer5 = new wxFlexGridSizer( 2, 11, 0, 0 ); @@ -120,99 +120,72 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx sbSizer3->Add( fgSizer5, 1, wxEXPAND, 5 ); - - bSizer4->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizer4; - sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_StandardOptions, wxID_ANY, wxEmptyString ), wxVERTICAL ); - wxFlexGridSizer* fgSizer11; - fgSizer11 = new wxFlexGridSizer( 0, 4, 0, 0 ); + fgSizer11 = new wxFlexGridSizer( 0, 2, 0, 0 ); fgSizer11->SetFlexibleDirection( wxBOTH ); fgSizer11->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_UpdateSchematic = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Update schematic"), wxDefaultPosition, wxDefaultSize, 0 ); - m_UpdateSchematic->SetValue(true); - fgSizer11->Add( m_UpdateSchematic, 0, wxALIGN_CENTER|wxALL, 5 ); + m_staticText9 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Based on location of:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizer11->Add( m_staticText9, 0, wxALL, 5 ); + wxString m_locationChoiceChoices[] = { _("Footprint"), _("Reference Designator") }; + int m_locationChoiceNChoices = sizeof( m_locationChoiceChoices ) / sizeof( wxString ); + m_locationChoice = new wxChoice( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_locationChoiceNChoices, m_locationChoiceChoices, 0 ); + m_locationChoice->SetSelection( 0 ); + fgSizer11->Add( m_locationChoice, 0, wxALL|wxEXPAND, 5 ); - fgSizer11->Add( 100, 0, 1, wxEXPAND, 5 ); - - m_SortGridText = new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, _("Round to:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SortGridText = new wxStaticText( sbSizer3->GetStaticBox(), 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.") ); - fgSizer11->Add( m_SortGridText, 0, wxALIGN_CENTER|wxALL, 5 ); + fgSizer11->Add( m_SortGridText, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 ); wxArrayString m_GridChoiceChoices; - m_GridChoice = new wxChoice( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_GridChoiceChoices, 0 ); + m_GridChoice = new wxChoice( sbSizer3->GetStaticBox(), 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( 300,-1 ) ); - fgSizer11->Add( m_GridChoice, 0, wxALL, 5 ); + fgSizer11->Add( m_GridChoice, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - sbSizer4->Add( fgSizer11, 0, wxEXPAND|wxALL, 0 ); - - wxFlexGridSizer* fgSizer331; - fgSizer331 = new wxFlexGridSizer( 0, 3, 0, 0 ); - fgSizer331->SetFlexibleDirection( wxBOTH ); - fgSizer331->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_SortOn = new wxStaticText( sbSizer4->GetStaticBox(), wxID_ANY, _("Sort by:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SortOn->Wrap( -1 ); - m_SortOn->SetMinSize( wxSize( 100,-1 ) ); - - fgSizer331->Add( m_SortOn, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_VERTICAL, 0 ); - - m_SortOnModules = new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY, _("Footprints"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP ); - m_SortOnModules->SetValue( true ); - m_SortOnModules->SetToolTip( _("Annotation based on footprint coordinates") ); - - fgSizer331->Add( m_SortOnModules, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - m_SortOnReference = new wxRadioButton( sbSizer4->GetStaticBox(), wxID_ANY, _("References"), wxDefaultPosition, wxSize( -1,-1 ), 0 ); - m_SortOnReference->SetToolTip( _("Annotation based on reference designator coordinates") ); - m_SortOnReference->SetMinSize( wxSize( 130,-1 ) ); - - fgSizer331->Add( m_SortOnReference, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + sbSizer3->Add( fgSizer11, 0, wxEXPAND|wxTOP, 5 ); - sbSizer4->Add( fgSizer331, 1, wxALL|wxEXPAND, 5 ); - - - bSizer4->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 ); + bSizer4->Add( sbSizer3, 0, wxALL|wxEXPAND, 5 ); wxStaticBoxSizer* sbSizer31; - sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_StandardOptions, wxID_ANY, wxEmptyString ), wxVERTICAL ); + sbSizer31 = new wxStaticBoxSizer( new wxStaticBox( m_StandardOptions, wxID_ANY, _("Reannotation Scope") ), wxVERTICAL ); wxFlexGridSizer* fgSizer6111; - fgSizer6111 = new wxFlexGridSizer( 0, 7, 0, 0 ); - fgSizer6111->SetFlexibleDirection( wxHORIZONTAL ); + fgSizer6111 = new wxFlexGridSizer( 0, 5, 0, 0 ); + fgSizer6111->SetFlexibleDirection( wxVERTICAL ); fgSizer6111->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_NONE ); - AnnotateLabel = new wxStaticText( sbSizer31->GetStaticBox(), wxID_ANY, _("Annotate:"), wxDefaultPosition, wxDefaultSize, 0 ); + AnnotateLabel = new wxStaticText( sbSizer31->GetStaticBox(), wxID_ANY, _("Reannotate:"), wxDefaultPosition, wxDefaultSize, 0 ); AnnotateLabel->Wrap( -1 ); - AnnotateLabel->SetMinSize( wxSize( 100,-1 ) ); - - fgSizer6111->Add( AnnotateLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + fgSizer6111->Add( AnnotateLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_AnnotateAll = new wxRadioButton( sbSizer31->GetStaticBox(), wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 ); m_AnnotateAll->SetValue( true ); - fgSizer6111->Add( m_AnnotateAll, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + fgSizer6111->Add( m_AnnotateAll, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_AnnotateFront = new wxRadioButton( sbSizer31->GetStaticBox(), wxID_ANY, _("Front"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateFront, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + fgSizer6111->Add( m_AnnotateFront, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_AnnotateBack = new wxRadioButton( sbSizer31->GetStaticBox(), wxID_ANY, _("Back"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateBack, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + fgSizer6111->Add( m_AnnotateBack, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_AnnotateSelection = new wxRadioButton( sbSizer31->GetStaticBox(), wxID_ANY, _("Selection"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizer6111->Add( m_AnnotateSelection, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + fgSizer6111->Add( m_AnnotateSelection, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - sbSizer31->Add( fgSizer6111, 1, wxEXPAND, 5 ); + sbSizer31->Add( fgSizer6111, 0, 0, 5 ); + + m_UpdateSchematic = new wxCheckBox( sbSizer31->GetStaticBox(), wxID_ANY, _("Update schematic"), wxDefaultPosition, wxDefaultSize, 0 ); + m_UpdateSchematic->SetValue(true); + sbSizer31->Add( m_UpdateSchematic, 0, wxALL, 5 ); bSizer4->Add( sbSizer31, 0, wxALL|wxEXPAND, 5 ); @@ -221,50 +194,26 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx m_StandardOptions->SetSizer( bSizer4 ); m_StandardOptions->Layout(); bSizer4->Fit( m_StandardOptions ); - m_notebook->AddPage( m_StandardOptions, _("Standard Options"), true ); + m_notebook->AddPage( m_StandardOptions, _("Options"), true ); m_Advanced = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); wxBoxSizer* bSizer5; - bSizer5 = new wxBoxSizer( wxVERTICAL ); - - wxFlexGridSizer* fgSizer3; - fgSizer3 = new wxFlexGridSizer( 3, 6, 0, 0 ); - fgSizer3->SetFlexibleDirection( wxBOTH ); - fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - - fgSizer3->Add( 48, 0, 1, wxEXPAND, 5 ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - - fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 ); - - - bSizer5->Add( fgSizer3, 0, wxEXPAND, 0 ); + bSizer5 = new wxBoxSizer( wxHORIZONTAL ); wxGridBagSizer* gbSizer1; - gbSizer1 = new wxGridBagSizer( 5, 5 ); + gbSizer1 = new wxGridBagSizer( 0, 0 ); gbSizer1->SetFlexibleDirection( wxBOTH ); gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + gbSizer1->SetEmptyCellSize( wxSize( 80,20 ) ); m_FrontRefDesStartText = new wxStaticText( m_Advanced, 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|wxALL, 5 ); + 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->SetToolTip( _("Default is 1") ); + m_FrontRefDesStart->SetMinSize( wxSize( 140,-1 ) ); gbSizer1->Add( m_FrontRefDesStart, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); @@ -272,62 +221,65 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx 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, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + 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->SetToolTip( _("Leave blank or zero, or enter a number greater than the highest reference designation on the front.") ); + m_BackRefDesStart->SetMinSize( wxSize( 140,-1 ) ); - gbSizer1->Add( m_BackRefDesStart, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + gbSizer1->Add( m_BackRefDesStart, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 ); m_RemoveFrontPrefix = new wxCheckBox( m_Advanced, 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 ), wxALL, 5 ); + 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->SetToolTip( _("If checked will remove the Back side prefix\nin the back prefix box if present") ); - gbSizer1->Add( m_RemoveBackPrefix, wxGBPosition( 2, 2 ), wxGBSpan( 1, 2 ), wxALL, 5 ); + gbSizer1->Add( m_RemoveBackPrefix, wxGBPosition( 2, 3 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); m_FrontPrefixText = new wxStaticText( m_Advanced, wxID_ANY, _("Front prefix:"), wxDefaultPosition, wxDefaultSize, 0 ); m_FrontPrefixText->Wrap( -1 ); m_FrontPrefixText->SetToolTip( _("Optional prefix for component side reference designations (i.e. F_)") ); - gbSizer1->Add( m_FrontPrefixText, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + 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->SetToolTip( _("Optional prefix for component side reference designations (i.e. F_)") ); - gbSizer1->Add( m_FrontPrefix, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + 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->Wrap( -1 ); m_BackPrefixText->SetToolTip( _("Optional prefix for solder side reference designations (i.e. B_)") ); - gbSizer1->Add( m_BackPrefixText, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + 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->SetToolTip( _("Optional prefix for solder side reference designations (i.e. B_)") ); - gbSizer1->Add( m_BackPrefix, wxGBPosition( 1, 3 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + gbSizer1->Add( m_BackPrefix, wxGBPosition( 1, 4 ), wxGBSpan( 1, 1 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 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( 3, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + gbSizer1->Add( m_ExcludeLocked, wxGBPosition( 4, 0 ), wxGBSpan( 1, 5 ), wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 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*)") ); - m_ExcludeListText->SetMinSize( wxSize( 150,-1 ) ); - gbSizer1->Add( m_ExcludeListText, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + gbSizer1->Add( m_ExcludeListText, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_ExcludeList = new wxTextCtrl( m_Advanced, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - m_ExcludeList->SetMinSize( wxSize( 153,-1 ) ); + gbSizer1->Add( m_ExcludeList, wxGBPosition( 5, 1 ), wxGBSpan( 1, 4 ), wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - gbSizer1->Add( m_ExcludeList, wxGBPosition( 3, 3 ), wxGBSpan( 1, 1 ), wxALL, 5 ); + gbSizer1->AddGrowableCol( 1 ); + gbSizer1->AddGrowableCol( 2 ); + gbSizer1->AddGrowableCol( 3 ); + gbSizer1->AddGrowableCol( 4 ); bSizer5->Add( gbSizer1, 1, wxALL|wxEXPAND, 5 ); @@ -337,12 +289,12 @@ DIALOG_BOARD_REANNOTATE_BASE::DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wx bSizer5->Fit( m_Advanced ); m_notebook->AddPage( m_Advanced, _("Reference Designators"), false ); - bupperSizer->Add( m_notebook, 1, wxALL|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + bupperSizer->Add( m_notebook, 0, wxALL|wxEXPAND|wxLEFT|wxRIGHT, 5 ); wxBoxSizer* bSizer6; bSizer6 = new wxBoxSizer( wxVERTICAL ); - m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL|wxVSCROLL ); + m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_MessageWindow->SetMinSize( wxSize( -1,150 ) ); bSizer6->Add( m_MessageWindow, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.fbp b/pcbnew/dialogs/dialog_board_reannotate_base.fbp index 257a331acf..b8962ce081 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.fbp +++ b/pcbnew/dialogs/dialog_board_reannotate_base.fbp @@ -48,7 +48,7 @@ 745,760 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Annotate PCB Geographically + Geographical Reannotation @@ -71,7 +71,7 @@ 5 wxALL|wxEXPAND|wxLEFT|wxRIGHT - 1 + 0 1 1 @@ -127,7 +127,7 @@ - Standard Options + Options 1 1 @@ -191,17 +191,17 @@ 0 wxID_ANY - Sorting + Footprint Order sbSizer3 - wxHORIZONTAL + wxVERTICAL 1 none - + 5 wxEXPAND 1 - + 11 wxBOTH @@ -1251,26 +1251,12 @@ - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - - - sbSizer4 - wxVERTICAL - 1 - none - - 0 - wxEXPAND|wxALL + + 5 + wxEXPAND|wxTOP 0 - - 4 + + 2 wxBOTH @@ -1281,11 +1267,11 @@ none 0 0 - + 5 - wxALIGN_CENTER|wxALL + wxALL 0 - + 1 1 1 @@ -1299,7 +1285,6 @@ 1 0 - 1 1 1 @@ -1314,7 +1299,8 @@ 0 0 wxID_ANY - Update schematic + Based on location of: + 0 0 @@ -1322,7 +1308,7 @@ 0 1 - m_UpdateSchematic + m_staticText9 1 @@ -1336,6 +1322,67 @@ ; ; forward_declare 0 + + + + -1 + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Footprint" "Reference Designator" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_locationChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + wxFILTER_NONE wxDefaultValidator @@ -1347,17 +1394,7 @@ 5 - wxEXPAND - 1 - - 0 - protected - 100 - - - - 5 - wxALIGN_CENTER|wxALL + wxBOTTOM|wxLEFT|wxRIGHT 0 1 @@ -1387,7 +1424,7 @@ 0 0 wxID_ANY - Round to: + Round locations to: 0 0 @@ -1418,7 +1455,7 @@ 5 - wxALL + wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1482,234 +1519,27 @@ - - 5 - wxALL|wxEXPAND - 1 - - 3 - wxBOTH - - - 0 - - fgSizer331 - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 0 - - 0 - wxALIGN_BOTTOM|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Sort by: - 0 - - 0 - - - 0 - 100,-1 - 1 - m_SortOn - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Footprints - - 0 - - - 0 - - 1 - m_SortOnModules - 1 - - - protected - 1 - - Resizable - 1 - - wxRB_GROUP - ; ; forward_declare - 0 - Annotation based on footprint coordinates - - wxFILTER_NONE - wxDefaultValidator - - 1 - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - References - - 0 - - - 0 - 130,-1 - 1 - m_SortOnReference - 1 - - - protected - 1 - - Resizable - 1 - -1,-1 - - ; ; forward_declare - 0 - Annotation based on reference designator coordinates - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - + 5 wxALL|wxEXPAND 0 - + wxID_ANY - + Reannotation Scope sbSizer31 wxVERTICAL 1 none - + 5 - wxEXPAND - 1 - - 7 - wxHORIZONTAL + + 0 + + 5 + wxVERTICAL 0 @@ -1721,7 +1551,7 @@ 0 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1751,14 +1581,14 @@ 0 0 wxID_ANY - Annotate: + Reannotate: 0 0 0 - 100,-1 + -1,-1 1 AnnotateLabel 1 @@ -1782,7 +1612,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1846,7 +1676,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1910,7 +1740,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -1974,7 +1804,7 @@ 5 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -2038,6 +1868,70 @@ + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Update schematic + + 0 + + + 0 + + 1 + m_UpdateSchematic + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + @@ -2101,106 +1995,28 @@ bSizer5 - wxVERTICAL + wxHORIZONTAL none - - 0 - wxEXPAND - 0 - - 6 - wxBOTH - - - 0 - -1,-1 - fgSizer3 - wxFLEX_GROWMODE_SPECIFIED - none - 3 - 0 - - 5 - wxEXPAND - 1 - - 0 - protected - 48 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 wxALL|wxEXPAND 1 - + 80,20 wxBOTH - + 1,2,3,4 - 5 + 0 gbSizer1 wxFLEX_GROWMODE_SPECIFIED none - 5 + 0 5 1 0 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -2301,7 +2117,7 @@ 0 0 - + 140,-1 1 m_FrontRefDesStart 1 @@ -2330,8 +2146,8 @@ 5 1 - 2 - wxALIGN_CENTER_VERTICAL|wxALL + 3 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -2394,8 +2210,8 @@ 5 1 - 3 - wxALL + 4 + wxALL|wxEXPAND 0 1 @@ -2432,7 +2248,7 @@ 0 - + 140,-1 1 m_BackRefDesStart 1 @@ -2462,7 +2278,7 @@ 5 2 0 - wxALL + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 2 1 @@ -2528,8 +2344,8 @@ 5 2 - 2 - wxALL + 3 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND 2 1 @@ -2596,7 +2412,7 @@ 5 1 0 - wxALIGN_CENTER_VERTICAL|wxALL + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT 1 1 @@ -2660,7 +2476,7 @@ 5 1 1 - wxALL + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 1 @@ -2727,8 +2543,8 @@ 5 1 - 2 - wxALIGN_CENTER_VERTICAL|wxALL + 3 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT 1 1 @@ -2791,8 +2607,8 @@ 5 1 - 3 - wxALL + 4 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 1 @@ -2858,10 +2674,10 @@ 5 - 2 + 5 0 - wxALIGN_CENTER_VERTICAL|wxALL - 3 + wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND + 4 1 1 @@ -2926,9 +2742,9 @@ 5 1 - 2 - wxALIGN_CENTER_VERTICAL|wxALL - 3 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 5 1 1 @@ -2965,7 +2781,7 @@ 0 - 150,-1 + -1,-1 1 m_ExcludeListText 1 @@ -2989,10 +2805,10 @@ 5 - 1 - 3 - wxALL - 3 + 4 + 1 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 5 1 1 @@ -3028,7 +2844,7 @@ 0 - 153,-1 + -1,-1 1 m_ExcludeList 1 @@ -3124,7 +2940,7 @@ - wxTAB_TRAVERSAL|wxVSCROLL + wxTAB_TRAVERSAL diff --git a/pcbnew/dialogs/dialog_board_reannotate_base.h b/pcbnew/dialogs/dialog_board_reannotate_base.h index 0d1b9f2781..43ffdf1ec6 100644 --- a/pcbnew/dialogs/dialog_board_reannotate_base.h +++ b/pcbnew/dialogs/dialog_board_reannotate_base.h @@ -24,10 +24,10 @@ class WX_HTML_REPORT_PANEL; #include #include #include -#include -#include #include #include +#include +#include #include #include #include @@ -65,17 +65,16 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM wxStaticBitmap* reannotate_up_left_bitmap; wxRadioButton* m_Left_Up; wxStaticBitmap* reannotate_left_up_bitmap; - wxCheckBox* m_UpdateSchematic; + wxStaticText* m_staticText9; + wxChoice* m_locationChoice; wxStaticText* m_SortGridText; wxChoice* m_GridChoice; - wxStaticText* m_SortOn; - wxRadioButton* m_SortOnModules; - wxRadioButton* m_SortOnReference; wxStaticText* AnnotateLabel; wxRadioButton* m_AnnotateAll; wxRadioButton* m_AnnotateFront; wxRadioButton* m_AnnotateBack; wxRadioButton* m_AnnotateSelection; + wxCheckBox* m_UpdateSchematic; wxPanel* m_Advanced; wxStaticText* m_FrontRefDesStartText; wxTextCtrl* m_FrontRefDesStart; @@ -105,7 +104,7 @@ class DIALOG_BOARD_REANNOTATE_BASE : public DIALOG_SHIM public: - DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Annotate PCB Geographically"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 745,760 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_BOARD_REANNOTATE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Geographical Reannotation"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 745,760 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_BOARD_REANNOTATE_BASE(); }; diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index 80d901925c..b6ba9b1173 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -378,7 +378,7 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() &m_FootprintWizardList.height, -1 ) ); m_params.emplace_back( new PARAM( - "reannotate_dialog.annotate_sort_on_modules", &m_Reannotate.sort_on_modules, true ) ); + "reannotate_dialog.annotate_sort_on_modules", &m_Reannotate.sort_on_module_location, true ) ); m_params.emplace_back( new PARAM( "reannotate_dialog.annotate_remove_front_prefix", &m_Reannotate.remove_front_prefix, false ) ); m_params.emplace_back( new PARAM( diff --git a/pcbnew/pcbnew_settings.h b/pcbnew/pcbnew_settings.h index 968056480f..825e012644 100644 --- a/pcbnew/pcbnew_settings.h +++ b/pcbnew/pcbnew_settings.h @@ -189,7 +189,7 @@ public: struct DIALOG_REANNOTATE { - bool sort_on_modules; + bool sort_on_module_location; bool remove_front_prefix; bool remove_back_prefix; bool update_schematic; diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 2a5bea4181..66a6801837 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -961,16 +961,16 @@ TOOL_ACTION PCB_ACTIONS::layerChanged( "pcbnew.Control.layerChanged", nullptr, AF_NOTIFY ); //Show board statistics tool -TOOL_ACTION PCB_ACTIONS::boardStatistics( "pcbnew.InspectionTool.ShowStatisticsDialog", AS_GLOBAL, - 0, LEGACY_HK_NAME( "Show Board Statistics" ), _( "Show Board Statistics" ), - _( "Shows board statistics" ), pcbnew_xpm ); - - -//Geographic re-annotation tool -TOOL_ACTION PCB_ACTIONS::boardReannotate( "pcbnew.ReannotateTool.ShowReannotateDialog", AS_GLOBAL, 0, - _( "Reannotate PCB" ), _( "Reannotate PCB" ), _( "Reannotate PCB" ), +TOOL_ACTION PCB_ACTIONS::boardStatistics( "pcbnew.InspectionTool.ShowStatisticsDialog", + AS_GLOBAL, 0, "", + _( "Show Board Statistics" ), _( "Shows board statistics" ), pcbnew_xpm ); +//Geographic re-annotation tool +TOOL_ACTION PCB_ACTIONS::boardReannotate( "pcbnew.ReannotateTool.ShowReannotateDialog", + AS_GLOBAL, 0, "", + _( "Geographical Reannotate..." ), _( "Reannotate PCB in geographical order" ), + annotate_xpm ); // PLACEMENT_TOOL //