Removing legacy autorouter menu options
The autorouter was removed in 3bac100 but a few items were left in place but mostly unconnected to functions. Fixes: lp:1768357 * https://bugs.launchpad.net/kicad/+bug/1768357
This commit is contained in:
parent
aec490e3ac
commit
2836d36de8
|
@ -118,12 +118,9 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
|
|||
}
|
||||
else if( GetToolId() == ID_NO_TOOL_SELECTED )
|
||||
{
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
|
||||
scanList = GENERAL_COLLECTOR::Modules;
|
||||
else
|
||||
scanList = (displ_opts->m_DisplayZonesMode == 0) ?
|
||||
GENERAL_COLLECTOR::AllBoardItems :
|
||||
GENERAL_COLLECTOR::AllButZones;
|
||||
scanList = (displ_opts->m_DisplayZonesMode == 0) ?
|
||||
GENERAL_COLLECTOR::AllBoardItems :
|
||||
GENERAL_COLLECTOR::AllButZones;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -142,37 +142,6 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
|||
{
|
||||
case PCB_MODULE_T:
|
||||
createPopUpMenuForFootprints( (MODULE*) item, aPopMenu );
|
||||
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
|
||||
{
|
||||
aPopMenu->AppendSeparator();
|
||||
|
||||
if( !( (MODULE*) item )->IsLocked() )
|
||||
{
|
||||
msg = AddHotkeyName( _("Lock Footprint" ), g_Board_Editor_Hotkeys_Descr,
|
||||
HK_LOCK_UNLOCK_FOOTPRINT );
|
||||
AddMenuItem( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE, msg,
|
||||
KiBitmap( locked_xpm ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = AddHotkeyName( _( "Unlock Footprint" ), g_Board_Editor_Hotkeys_Descr,
|
||||
HK_LOCK_UNLOCK_FOOTPRINT );
|
||||
AddMenuItem( aPopMenu, ID_POPUP_PCB_AUTOPLACE_FREE_MODULE, msg,
|
||||
KiBitmap( unlocked_xpm ) );
|
||||
}
|
||||
|
||||
if( !flags )
|
||||
aPopMenu->Append( ID_POPUP_PCB_AUTOPLACE_CURRENT_MODULE,
|
||||
_( "Automatically Place Footprint" ) );
|
||||
}
|
||||
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
|
||||
{
|
||||
if( !flags )
|
||||
aPopMenu->Append( ID_POPUP_PCB_AUTOROUTE_MODULE,
|
||||
_( "Automatically Route Footprint" ) );
|
||||
}
|
||||
break;
|
||||
|
||||
case PCB_PAD_T:
|
||||
|
@ -423,42 +392,14 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
|||
break;
|
||||
|
||||
case ID_NO_TOOL_SELECTED:
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
|
||||
{
|
||||
wxMenu* commands = new wxMenu;
|
||||
AddMenuItem( aPopMenu, commands, ID_POPUP_PCB_AUTOPLACE_COMMANDS,
|
||||
_( "Global Spread and Place" ), KiBitmap( move_xpm ) );
|
||||
AddMenuItem( commands, ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES,
|
||||
_( "Unlock All Footprints" ), KiBitmap( unlocked_xpm ) );
|
||||
AddMenuItem( commands, ID_POPUP_PCB_AUTOPLACE_FIXE_ALL_MODULES,
|
||||
_( "Lock All Footprints" ), KiBitmap( locked_xpm ) );
|
||||
commands->AppendSeparator();
|
||||
AddMenuItem( commands, ID_POPUP_PCB_SPREAD_ALL_MODULES,
|
||||
_( "Spread out All Footprints" ), KiBitmap( move_xpm ) );
|
||||
commands->Append( ID_POPUP_PCB_SPREAD_NEW_MODULES,
|
||||
_( "Spread out Footprints not Already on Board" ) );
|
||||
commands->AppendSeparator();
|
||||
commands->Append( ID_POPUP_PCB_AUTOPLACE_ALL_MODULES,
|
||||
_( "Automatically Place All Footprints" ) );
|
||||
commands->Append( ID_POPUP_PCB_AUTOPLACE_NEW_MODULES,
|
||||
_( "Automatically Place New Footprints" ) );
|
||||
commands->Append( ID_POPUP_PCB_AUTOPLACE_NEXT_MODULE,
|
||||
_( "Automatically Place Next Footprints" ) );
|
||||
}
|
||||
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
|
||||
{
|
||||
wxMenu* commands = new wxMenu;
|
||||
aPopMenu->Append( ID_POPUP_PCB_AUTOROUTE_COMMANDS, _( "Autoroute" ), commands );
|
||||
AddMenuItem( commands, ID_POPUP_PCB_SELECT_LAYER_PAIR,
|
||||
_( "Select Layer Pair..." ), KiBitmap( select_layer_pair_xpm ) );
|
||||
commands->AppendSeparator();
|
||||
commands->Append( ID_POPUP_PCB_AUTOROUTE_ALL_MODULES,
|
||||
_( "Automatically Route All Footprints" ) );
|
||||
commands->AppendSeparator();
|
||||
commands->Append( ID_POPUP_PCB_AUTOROUTE_RESET_UNROUTED, _( "Reset Unrouted" ) );
|
||||
aPopMenu->AppendSeparator();
|
||||
}
|
||||
{
|
||||
wxMenu* commands = new wxMenu;
|
||||
AddMenuItem( aPopMenu, commands, ID_POPUP_PCB_AUTOPLACE_COMMANDS,
|
||||
_( "Global Spread and Place" ), KiBitmap( move_xpm ) );
|
||||
AddMenuItem( commands, ID_POPUP_PCB_SPREAD_ALL_MODULES,
|
||||
_( "Spread out All Footprints" ), KiBitmap( move_xpm ) );
|
||||
commands->Append( ID_POPUP_PCB_SPREAD_NEW_MODULES,
|
||||
_( "Spread out Footprints not Already on Board" ) );
|
||||
|
||||
if( !trackFound )
|
||||
{
|
||||
|
@ -475,6 +416,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
|
|||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -960,12 +902,6 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu )
|
|||
|
||||
AddMenuItem( sub_menu_Pad, ID_POPUP_PCB_DELETE_PAD, _( "Delete" ), KiBitmap( delete_pad_xpm ) );
|
||||
|
||||
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
|
||||
{
|
||||
menu->Append( ID_POPUP_PCB_AUTOROUTE_PAD, _( "Automatically Route Pad" ) );
|
||||
menu->Append( ID_POPUP_PCB_AUTOROUTE_NET, _( "Automatically Route Net" ) );
|
||||
}
|
||||
|
||||
MODULE* module = Pad->GetParent();
|
||||
|
||||
if( module )
|
||||
|
|
|
@ -215,8 +215,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
|||
EVT_COMBOBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions )
|
||||
EVT_CHOICE( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
||||
EVT_CHOICE( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event )
|
||||
EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnSelectAutoPlaceMode )
|
||||
EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnSelectAutoPlaceMode )
|
||||
EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool )
|
||||
|
||||
|
||||
|
@ -300,8 +298,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
|
|||
EVT_UPDATE_UI( ID_POPUP_PCB_SELECT_CUSTOM_WIDTH,
|
||||
PCB_EDIT_FRAME::OnUpdateSelectCustomTrackWidth )
|
||||
EVT_UPDATE_UI( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::OnUpdateSelectViaSize )
|
||||
EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::OnUpdateAutoPlaceModulesMode )
|
||||
EVT_UPDATE_UI( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::OnUpdateAutoPlaceTracksMode )
|
||||
EVT_UPDATE_UI_RANGE( ID_POPUP_PCB_SELECT_WIDTH1, ID_POPUP_PCB_SELECT_WIDTH8,
|
||||
PCB_EDIT_FRAME::OnUpdateSelectTrackWidth )
|
||||
EVT_UPDATE_UI_RANGE( ID_POPUP_PCB_SELECT_VIASIZE1, ID_POPUP_PCB_SELECT_VIASIZE8,
|
||||
|
@ -1190,37 +1186,6 @@ void PCB_EDIT_FRAME::ScriptingConsoleEnableDisable( wxCommandEvent& aEvent )
|
|||
#endif
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnSelectAutoPlaceMode( wxCommandEvent& aEvent )
|
||||
{
|
||||
// Automatic placement of modules and tracks is a mutually exclusive operation so
|
||||
// clear the other tool if one of the two is selected.
|
||||
// Be careful: this event function is called both by the
|
||||
// ID_TOOLBARH_PCB_MODE_MODULE and the ID_TOOLBARH_PCB_MODE_TRACKS tool
|
||||
// Therefore we should avoid a race condition when deselecting one of these tools
|
||||
// inside this function (seems happen on some Linux/wxWidgets versions)
|
||||
// when the other tool is selected
|
||||
|
||||
switch( aEvent.GetId() )
|
||||
{
|
||||
case ID_TOOLBARH_PCB_MODE_MODULE:
|
||||
if( aEvent.IsChecked() &&
|
||||
m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_TRACKS ) )
|
||||
{
|
||||
m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_TRACKS, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_TOOLBARH_PCB_MODE_TRACKS:
|
||||
if( aEvent.IsChecked() &&
|
||||
m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
|
||||
{
|
||||
m_mainToolBar->ToggleTool( ID_TOOLBARH_PCB_MODE_MODULE, false );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::OnLayerColorChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
ReCreateLayerBox();
|
||||
|
|
|
@ -1644,20 +1644,6 @@ public:
|
|||
wxPoint aSpreadAreaPosition,
|
||||
bool aPrepareUndoCommand = true );
|
||||
|
||||
/**
|
||||
* Function AutoPlaceModule
|
||||
* automatically places footprints within the confines of the PCB edges.
|
||||
* The components with the FIXED status are not moved. If the menu is
|
||||
* calling the placement of 1 module, it will be replaced.
|
||||
*/
|
||||
void AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC );
|
||||
|
||||
// Autorouting:
|
||||
int Solve( AUTOROUTER_CONTEXT& aCtx, int aLayersCount );
|
||||
void Reset_Noroutable( wxDC* DC );
|
||||
void Autoroute( wxDC* DC, int mode );
|
||||
void ReadAutoroutedTracks( wxDC* DC );
|
||||
void GlobalRoute( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function Show_1_Ratsnest
|
||||
|
|
|
@ -319,13 +319,6 @@ void PCB_EDIT_FRAME::ReCreateHToolbar()
|
|||
m_mainToolBar->AddTool( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, wxEmptyString,
|
||||
*LayerPairBitmap, SEL_LAYER_HELP );
|
||||
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
m_mainToolBar->AddTool( ID_TOOLBARH_PCB_MODE_MODULE, wxEmptyString, KiScaledBitmap( mode_module_xpm, this ),
|
||||
_( "Mode footprint: manual and automatic movement and placement" ),
|
||||
wxITEM_CHECK );
|
||||
m_mainToolBar->AddTool( ID_TOOLBARH_PCB_MODE_TRACKS, wxEmptyString, KiScaledBitmap( mode_track_xpm, this ),
|
||||
_( "Mode track: autorouting" ), wxITEM_CHECK );
|
||||
|
||||
// Fast call to FreeROUTE Web Bases router
|
||||
KiScaledSeparator( m_mainToolBar, this );
|
||||
m_mainToolBar->AddTool( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, wxEmptyString,
|
||||
|
|
Loading…
Reference in New Issue