Goal: Add a keyboard toggle for the “Edit Linked Parts” checkbox in the Edit window. I’ll also probably add a menu entry for it in the Tools menu as part of that process.
Obstacles: The preference for “Edit Linked Parts” is actually saved as the opposite of that: “SelectLinkedSet”. When the ELP checkbox is on, that means the SLS preference is off. This means there must necessarily be an extra layer of code between the checkbox and the preference, in order to do everything oppositely.
How to accomplish the goal:
- Convert “SelectLinkedSet” preference to a new “EditLinkedParts” preference.
- Update all the code in the viewer that depends on SLS, to make them depend on ELP instead. Don’t forget to correct for the non-oppositeness.
- Change the “Edit Linked Parts” checkbox to use the LLUICtrlFactory to access ELP.
- Add a menu entry with a key binding to the Tools menu to toggle ELP.*
* I might be able to add a key binding without adding the new menu entry, but I don’t currently know how to do that, and the menu entry is a good thing anyway.
Rewards: The building process will be much faster and more fluid!