From 5285962775fef4ef8eb8590ef30a58a9e4676ed2 Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Sat, 11 Jun 2016 22:34:07 -0400 Subject: [PATCH] Remove option to not show footprint ratsnest when moving This option only exists in legacy, with no real plan to port it to GAL. Nobody seems to use this; there isn't really much of a point to it. Bye! --- include/wxPcbStruct.h | 1 - pcbnew/dialogs/dialog_general_options.cpp | 2 - ...ialog_general_options_BoardEditor_base.cpp | 5 -- ...ialog_general_options_BoardEditor_base.fbp | 88 ------------------- .../dialog_general_options_BoardEditor_base.h | 2 - pcbnew/pcbframe.cpp | 3 - pcbnew/pcbnew_config.cpp | 2 - pcbnew/pcbnew_id.h | 1 - pcbnew/tool_pcb.cpp | 8 -- pcbnew/toolbars_update_user_interface.cpp | 13 +-- pcbnew/tools/common_actions.cpp | 1 - 11 files changed, 1 insertion(+), 125 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index a850228702..292920a710 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -259,7 +259,6 @@ public: void OnUpdateLayerSelectBox( wxUpdateUIEvent& aEvent ); void OnUpdateDrcEnable( wxUpdateUIEvent& aEvent ); void OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent ); - void OnUpdateShowModuleRatsnest( wxUpdateUIEvent& aEvent ); void OnUpdateAutoDeleteTrack( wxUpdateUIEvent& aEvent ); void OnUpdateViaDrawMode( wxUpdateUIEvent& aEvent ); void OnUpdateTraceDrawMode( wxUpdateUIEvent& aEvent ); diff --git a/pcbnew/dialogs/dialog_general_options.cpp b/pcbnew/dialogs/dialog_general_options.cpp index cef6960fdd..8f2b0fb880 100644 --- a/pcbnew/dialogs/dialog_general_options.cpp +++ b/pcbnew/dialogs/dialog_general_options.cpp @@ -83,7 +83,6 @@ void DIALOG_GENERALOPTIONS::init() m_MaxShowLinks->SetValue( displ_opts->m_MaxLinksShowed ); m_DrcOn->SetValue( g_Drc_On ); - m_ShowModuleRatsnest->SetValue( displ_opts->m_Show_Module_Ratsnest ); m_ShowGlobalRatsnest->SetValue( m_Board->IsElementVisible( RATSNEST_VISIBLE ) ); m_TrackAutodel->SetValue( g_AutoDeleteOldTrack ); m_Track_45_Only_Ctrl->SetValue( g_Track_45_Only_Allowed ); @@ -132,7 +131,6 @@ void DIALOG_GENERALOPTIONS::OnOkClick( wxCommandEvent& event ) GetParent()->OnModify(); } - displ_opts->m_Show_Module_Ratsnest = m_ShowModuleRatsnest->GetValue(); g_AutoDeleteOldTrack = m_TrackAutodel->GetValue(); g_Segments_45_Only = m_Segments_45_Only_Ctrl->GetValue(); g_Track_45_Only_Allowed = m_Track_45_Only_Ctrl->GetValue(); diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp index 69eab46480..288c338482 100644 --- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp +++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.cpp @@ -102,11 +102,6 @@ DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE::DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE( bMiddleRightBoxSizer->Add( m_ShowGlobalRatsnest, 0, wxALL, 5 ); - m_ShowModuleRatsnest = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_RATSNEST_MODULE, _("S&how footprint ratsnest"), wxDefaultPosition, wxDefaultSize, 0 ); - m_ShowModuleRatsnest->SetToolTip( _("Shows (or not) the local ratsnest relative to a footprint, when moving it.\nThis ratsnest is useful to place a footprint.") ); - - bMiddleRightBoxSizer->Add( m_ShowModuleRatsnest, 0, wxALL, 5 ); - m_TrackAutodel = new wxCheckBox( bMiddleRightBoxSizer->GetStaticBox(), wxID_TRACK_AUTODEL, _("&Delete unconnected tracks"), wxDefaultPosition, wxDefaultSize, 0 ); m_TrackAutodel->SetToolTip( _("Enable/disable the automatic track deletion when recreating a track.") ); diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp index 3c7216a84e..30d86e6b1b 100644 --- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp +++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.fbp @@ -1115,94 +1115,6 @@ - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_RATSNEST_MODULE - S&how footprint ratsnest - - 0 - - - 0 - - 1 - m_ShowModuleRatsnest - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Shows (or not) the local ratsnest relative to a footprint, when moving it. This ratsnest is useful to place a footprint. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 wxALL diff --git a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h index 2c291fad6d..15ab05a77b 100644 --- a/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h +++ b/pcbnew/dialogs/dialog_general_options_BoardEditor_base.h @@ -47,7 +47,6 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM wxID_CURSOR_SHAPE, wxID_DRC_ONOFF, wxID_GENERAL_RATSNEST, - wxID_RATSNEST_MODULE, wxID_TRACK_AUTODEL, wxID_TRACKS45, wxID_SEGMENTS45, @@ -66,7 +65,6 @@ class DIALOG_GENERALOPTIONS_BOARDEDITOR_BASE : public DIALOG_SHIM wxTextCtrl* m_RotationAngle; wxCheckBox* m_DrcOn; wxCheckBox* m_ShowGlobalRatsnest; - wxCheckBox* m_ShowModuleRatsnest; wxCheckBox* m_TrackAutodel; wxCheckBox* m_Track_45_Only_Ctrl; wxCheckBox* m_Segments_45_Only_Ctrl; diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 685e08ff2e..2f6214f7b6 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -224,8 +224,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) PCB_EDIT_FRAME::OnSelectOptionToolbar ) EVT_TOOL( ID_TB_OPTIONS_SHOW_RATSNEST, PCB_EDIT_FRAME::OnSelectOptionToolbar ) - EVT_TOOL( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST, - PCB_EDIT_FRAME::OnSelectOptionToolbar ) EVT_TOOL( ID_TB_OPTIONS_AUTO_DEL_TRACK, PCB_EDIT_FRAME::OnSelectOptionToolbar ) EVT_TOOL( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, @@ -276,7 +274,6 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_UPDATE_UI( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::OnUpdateLayerSelectBox ) EVT_UPDATE_UI( ID_TB_OPTIONS_DRC_OFF, PCB_EDIT_FRAME::OnUpdateDrcEnable ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_RATSNEST, PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest ) - EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST, PCB_EDIT_FRAME::OnUpdateShowModuleRatsnest ) EVT_UPDATE_UI( ID_TB_OPTIONS_AUTO_DEL_TRACK, PCB_EDIT_FRAME::OnUpdateAutoDeleteTrack ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_VIAS_SKETCH, PCB_EDIT_FRAME::OnUpdateViaDrawMode ) EVT_UPDATE_UI( ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, PCB_EDIT_FRAME::OnUpdateTraceDrawMode ) diff --git a/pcbnew/pcbnew_config.cpp b/pcbnew/pcbnew_config.cpp index d485ead163..9385e6d92b 100644 --- a/pcbnew/pcbnew_config.cpp +++ b/pcbnew/pcbnew_config.cpp @@ -409,8 +409,6 @@ PARAM_CFG_ARRAY& PCB_EDIT_FRAME::GetConfigurationSettings() m_configSettings.push_back( new PARAM_CFG_INT( true, wxT( "MaxLnkS" ), &displ_opts->m_MaxLinksShowed, 3, 0, 15 ) ); - m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "ShowMRa" ), - &displ_opts->m_Show_Module_Ratsnest, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "TwoSegT" ), &g_TwoSegmentTrackBuild, true ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "SegmPcb45Only" ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index cd93db86b4..73802eea49 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -307,7 +307,6 @@ enum pcbnew_ids ID_TB_OPTIONS_SHOW_ZONES_OUTLINES_ONLY, ID_TB_OPTIONS_DRC_OFF, ID_TB_OPTIONS_SHOW_RATSNEST, - ID_TB_OPTIONS_SHOW_MODULE_RATSNEST, ID_TB_OPTIONS_AUTO_DEL_TRACK, ID_TB_OPTIONS_SHOW_VIAS_SKETCH, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index b65c35551e..c28a1ffc0e 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -353,10 +353,6 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar() m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_RATSNEST, wxEmptyString, KiBitmap( general_ratsnest_xpm ), _( "Show board ratsnest" ), wxITEM_CHECK ); - m_optionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST, wxEmptyString, - KiBitmap( local_ratsnest_xpm ), - _( "Show footprint ratsnest when moving" ), - wxITEM_CHECK ); m_optionsToolBar->AddSeparator(); m_optionsToolBar->AddTool( ID_TB_OPTIONS_AUTO_DEL_TRACK, wxEmptyString, @@ -752,10 +748,6 @@ void PCB_EDIT_FRAME::OnSelectOptionToolbar( wxCommandEvent& event ) m_canvas->Refresh(); break; - case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: - displ_opts->m_Show_Module_Ratsnest = state; // TODO: see if we can use the visibility list - break; - case ID_TB_OPTIONS_AUTO_DEL_TRACK: g_AutoDeleteOldTrack = state; break; diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp index 693eb93223..79fd084284 100644 --- a/pcbnew/toolbars_update_user_interface.cpp +++ b/pcbnew/toolbars_update_user_interface.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2012 Wayne Stambaugh - * Copyright (C) 2012-2015 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012-2016 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -150,17 +150,6 @@ void PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent ) } -void PCB_EDIT_FRAME::OnUpdateShowModuleRatsnest( wxUpdateUIEvent& aEvent ) -{ - DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions(); - aEvent.Check( displ_opts->m_Show_Module_Ratsnest ); - m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_MODULE_RATSNEST, - displ_opts->m_Show_Module_Ratsnest ? - _( "Hide footprint ratsnest" ) : - _( "Show footprint ratsnest" ) ); -} - - void PCB_EDIT_FRAME::OnUpdateAutoDeleteTrack( wxUpdateUIEvent& aEvent ) { aEvent.Check( g_AutoDeleteOldTrack ); diff --git a/pcbnew/tools/common_actions.cpp b/pcbnew/tools/common_actions.cpp index 011596b62e..dcd50d181b 100644 --- a/pcbnew/tools/common_actions.cpp +++ b/pcbnew/tools/common_actions.cpp @@ -734,7 +734,6 @@ boost::optional COMMON_ACTIONS::TranslateLegacyId( int aId ) return COMMON_ACTIONS::appendBoard.MakeEvent(); case ID_PCB_SHOW_1_RATSNEST_BUTT: - case ID_TB_OPTIONS_SHOW_MODULE_RATSNEST: return COMMON_ACTIONS::toBeDone.MakeEvent(); }