Merge lp:~azonenberg/kicad/advanced-feature-bugfixes into lp:kicad/product

Proposed by Andrew Zonenberg
Status: Merged
Merged at revision: 5934
Proposed branch: lp:~azonenberg/kicad/advanced-feature-bugfixes
Merge into: lp:kicad/product
Diff against target: 28 lines (+9/-3)
1 file modified
include/tool/tool_event.h (+9/-3)
To merge this branch: bzr merge lp:~azonenberg/kicad/advanced-feature-bugfixes
Reviewer Review Type Date Requested Status
KiCad Lead Developers Pending
Review via email: mp+264584@code.launchpad.net

Description of the change

Fixed bug causing layer-change events to not be propagated to the routing tool

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/tool/tool_event.h'
2--- include/tool/tool_event.h 2015-06-05 15:49:01 +0000
3+++ include/tool/tool_event.h 2015-07-13 14:57:29 +0000
4@@ -338,9 +338,6 @@
5 if( !( m_category & aEvent.m_category ) )
6 return false;
7
8- if( !( m_actions & aEvent.m_actions ) )
9- return false;
10-
11 if( m_category == TC_COMMAND || m_category == TC_MESSAGE )
12 {
13 if( (bool) m_commandStr && (bool) aEvent.m_commandStr )
14@@ -350,6 +347,15 @@
15 return *m_commandId == *aEvent.m_commandId;
16 }
17
18+ // BUGFIX: TA_ANY should match EVERYTHING, even TA_NONE (for TC_MESSAGE)
19+ if( m_actions == TA_ANY && aEvent.m_actions == TA_NONE && aEvent.m_category == TC_MESSAGE)
20+ return true;
21+
22+ // BUGFIX: This check must happen after the TC_COMMAND check because otherwise events of
23+ // the form { TC_COMMAND, TA_NONE } will be incorrectly skipped
24+ if( !( m_actions & aEvent.m_actions ) )
25+ return false;
26+
27 return true;
28 }
29