From: <gi...@gp...> - 2011-05-10 13:30:42
|
The branch, master has been updated discards aa357bf1ad609487f42db9c54b320087837898dc (commit) via cec4f8c85e35ab012673703ce789568711b0e3a4 (commit) from aa357bf1ad609487f42db9c54b320087837898dc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. ========= Summary ========= src/search.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) ================= Commit Messages ================= commit cec4f8c85e35ab012673703ce789568711b0e3a4 Author: Peter Clifton <pc...@ca...> Commit: Peter Clifton <pc...@ca...> search.c: Don't allow selecting pads or pins of locked elements The locked flag test was mistakenly being applied ot the pad or pin its-self, not the parent element. :100644 100644 3fafcd4... 30fe883... M src/search.c ========= Changes ========= commit cec4f8c85e35ab012673703ce789568711b0e3a4 Author: Peter Clifton <pc...@ca...> Commit: Peter Clifton <pc...@ca...> search.c: Don't allow selecting pads or pins of locked elements The locked flag test was mistakenly being applied ot the pad or pin its-self, not the parent element. diff --git a/src/search.c b/src/search.c index 3fafcd4..30fe883 100644 --- a/src/search.c +++ b/src/search.c @@ -114,13 +114,14 @@ pinorvia_callback (const BoxType * box, void *cl) { struct ans_info *i = (struct ans_info *) cl; PinTypePtr pin = (PinTypePtr) box; + AnyObjectType *ptr1 = pin->Element ? pin->Element : pin; - if (TEST_FLAG (i->locked, pin)) + if (TEST_FLAG (i->locked, ptr1)) return 0; if (!IsPointOnPin (PosX, PosY, SearchRadius, pin)) return 0; - *i->ptr1 = pin->Element ? pin->Element : pin; + *i->ptr1 = ptr1; *i->ptr2 = *i->ptr3 = pin; longjmp (i->env, 1); return 1; /* never reached */ @@ -181,15 +182,16 @@ pad_callback (const BoxType * b, void *cl) { PadTypePtr pad = (PadTypePtr) b; struct ans_info *i = (struct ans_info *) cl; + AnyObjectType *ptr1 = pad->Element; - if (TEST_FLAG (i->locked, pad)) + if (TEST_FLAG (i->locked, ptr1)) return 0; if (FRONT (pad) || i->BackToo) { if (IsPointInPad (PosX, PosY, SearchRadius, pad)) { - *i->ptr1 = pad->Element; + *i->ptr1 = ptr1; *i->ptr2 = *i->ptr3 = pad; longjmp (i->env, 1); } |