Re-enabling global spread and place
This had been removed along with autorouter but its functionality is still desired. If/when the autorouter is resurrected, these IDs will need to be deconflicted. Fixes: lp:1766550 * https://bugs.launchpad.net/kicad/+bug/1766550
This commit is contained in:
parent
d0ffff3b88
commit
8d017c9261
|
@ -1279,6 +1279,29 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
m_canvas->Refresh();
|
m_canvas->Refresh();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ID_POPUP_PCB_SPREAD_ALL_MODULES:
|
||||||
|
if( !IsOK( this,
|
||||||
|
_("Not locked footprints inside the board will be moved. OK?") ) )
|
||||||
|
break;
|
||||||
|
// Fall through
|
||||||
|
case ID_POPUP_PCB_SPREAD_NEW_MODULES:
|
||||||
|
if( GetBoard()->m_Modules == NULL )
|
||||||
|
{
|
||||||
|
DisplayError( this, _( "No footprint found!" ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MODULE* footprint = GetBoard()->m_Modules;
|
||||||
|
std::vector<MODULE*> footprintList;
|
||||||
|
for( ; footprint != NULL; footprint = footprint->Next() )
|
||||||
|
footprintList.push_back( footprint );
|
||||||
|
|
||||||
|
SpreadFootprints( &footprintList, id == ID_POPUP_PCB_SPREAD_NEW_MODULES,
|
||||||
|
true, GetCrossHairPosition() );
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), id );
|
msg.Printf( wxT( "PCB_EDIT_FRAME::Process_Special_Functions() unknown event id %d" ), id );
|
||||||
|
|
|
@ -274,6 +274,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
||||||
EVT_MENU( ID_POPUP_PCB_DELETE_TRACKSEG, PCB_EDIT_FRAME::Process_Special_Functions )
|
EVT_MENU( ID_POPUP_PCB_DELETE_TRACKSEG, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
|
EVT_MENU_RANGE( ID_POPUP_GENERAL_START_RANGE, ID_POPUP_GENERAL_END_RANGE,
|
||||||
PCB_EDIT_FRAME::Process_Special_Functions )
|
PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
|
EVT_MENU( ID_POPUP_PCB_SPREAD_ALL_MODULES, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
|
EVT_MENU( ID_POPUP_PCB_SPREAD_NEW_MODULES, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||||
|
|
||||||
// User interface update event handlers.
|
// User interface update event handlers.
|
||||||
EVT_UPDATE_UI( ID_SAVE_BOARD, PCB_EDIT_FRAME::OnUpdateSave )
|
EVT_UPDATE_UI( ID_SAVE_BOARD, PCB_EDIT_FRAME::OnUpdateSave )
|
||||||
|
|
Loading…
Reference in New Issue