Fix board setup issue with reloading

Previous fix for the non-updated netclass pointers caused issues with
display of overlay view items and was bigger than needed to be.  Just
resetting the tools gets the pointers released.

Fixes: lp:1835533
* https://bugs.launchpad.net/kicad/+bug/1835533
This commit is contained in:
Seth Hillbrand 2019-07-06 06:35:46 -07:00
parent 39c830435c
commit 3d8d852990
1 changed files with 8 additions and 7 deletions

View File

@ -23,16 +23,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
#include <fctsys.h>
#include <base_units.h> #include <base_units.h>
#include <confirm.h>
#include <pcb_edit_frame.h>
#include <board_design_settings.h>
#include <bitmaps.h> #include <bitmaps.h>
#include <widgets/wx_grid.h> #include <board_design_settings.h>
#include <confirm.h>
#include <grid_tricks.h> #include <grid_tricks.h>
#include <panel_setup_netclasses.h> #include <panel_setup_netclasses.h>
#include <pcb_edit_frame.h>
#include <tool/tool_manager.h>
#include <widgets/wx_grid.h>
// Columns of netclasses grid // Columns of netclasses grid
enum { enum {
@ -267,7 +266,9 @@ bool PANEL_SETUP_NETCLASSES::TransferDataFromWindow()
m_Pcb->SynchronizeNetsAndNetClasses(); m_Pcb->SynchronizeNetsAndNetClasses();
m_BrdSettings->SetCurrentNetClass( NETCLASS::Default ); m_BrdSettings->SetCurrentNetClass( NETCLASS::Default );
m_Frame->SetBoard( m_Pcb );
if( auto toolmgr = m_Frame->GetToolManager() )
toolmgr->ResetTools( TOOL_BASE::MODEL_RELOAD );
return true; return true;
} }