Kuba,
> Nothing seems to check for SELECT_HIDE. Should disable/enable_selects
> be removed, or should the checking be implemented?
Ah, that's a tricky one! You'll notice that if you select an element
and do "Edit->Select Filter->Disable Selection", it really works. . .
you can't select the element any more!
Why? Because the SELECT_HIDE bit is stuck (along with some other bits)
in the "type" record of the element. The selection routine is passed
a bitmask of types to look for, and it ignores all others. When the
"SELECT_HIDE" bit is added to an element's type, the type value changes,
and it no longer matches any bitmask value passed to the selection
routine.
The upper bits (including SELECT_HIDE) are often masked out by using
the ALL_TYPES or VALID_TYPES macros. The other bits, though, like
REMOVE_TAG, NETLIST_INVALID, and DRAW_HIDE, all apply to elements that
would not be selectable anyway (in particular, if you don't draw an
element, you definitely don't want to be able to select it, so DRAW_HIDE
also makes an element unselectable).
That's probably just the kind of code hack that you despise, since it's
impossible for even a good code reader like you to figure out what's
going on. So feel free to re-implement it.
---Tim
+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim) | email: [email protected] |
| Open Circuit Design, Inc. | web: http://opencircuitdesign.com |
| 22815 Timber Creek Lane | phone: (301) 528-5030 |
| Clarksburg, MD 20871-4001 | cell: (240) 401-0616 |
+--------------------------------+-------------------------------------+
_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev