From 4124019f41d50b0ed793cc06469cf37c6e285891 Mon Sep 17 00:00:00 2001 From: Dan Weatherill Date: Sun, 7 Jan 2018 02:42:04 +0000 Subject: [PATCH] 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 --- pcbnew/dialogs/dialog_design_rules.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 49ecdd2983..d63706e701 100644 --- a/pcbnew/dialogs/dialog_design_rules.cpp +++ b/pcbnew/dialogs/dialog_design_rules.cpp @@ -47,6 +47,9 @@ #include #include +#include +#include + // 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; } + + + +