Send model change event on design rules change

Dispatches a TA_MODEL_CHANGE event when the design rules dialog is
closed, the intention being to cause the router tool to re-sync its
design rule information

Fixes: lp:1462929
* https://bugs.launchpad.net/kicad/+bug/1462929
This commit is contained in:
Dan Weatherill 2018-01-07 02:42:04 +00:00 committed by Wayne Stambaugh
parent 80035661dc
commit 4124019f41
1 changed files with 14 additions and 0 deletions

View File

@ -47,6 +47,9 @@
#include <wx/generic/gridctrl.h>
#include <dialog_design_rules_aux_helper_class.h>
#include <tool/tool_event.h>
#include <tool/tool_manager.h>
// Column labels for net lists
#define NET_TITLE _( "Net" )
#define CLASS_TITLE _( "Class" )
@ -708,6 +711,13 @@ bool DIALOG_DESIGN_RULES::TransferDataFromWindow()
CopyGlobalRulesToBoard();
CopyDimensionsListsToBoard();
m_BrdSettings->SetCurrentNetClass( NETCLASS::Default );
//this event causes the routing tool to reload its design rules information
TOOL_MANAGER* toolManager = m_Parent->GetToolManager();
TOOL_EVENT event( TC_COMMAND, TA_MODEL_CHANGE, AS_ACTIVE );
toolManager->ProcessEvent( event );
return true;
}
@ -1198,3 +1208,7 @@ bool DIALOG_DESIGN_RULES::TestDataValidity( wxString* aErrorMsg )
return result;
}