From 78008724e07ef459dad7bc01c43d9b3711b426f2 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 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.13.6" This is a multi-part message in MIME format. --------------2.13.6 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit 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(+) --------------2.13.6 Content-Type: text/x-patch; name="0001-Send-model-change-event-on-design-rules-change.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0001-Send-model-change-event-on-design-rules-change.patch" diff --git a/pcbnew/dialogs/dialog_design_rules.cpp b/pcbnew/dialogs/dialog_design_rules.cpp index 49bad04eb..0c5d909b4 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; } + + + + --------------2.13.6--