Rather than re-building the library menu for every open sketch (very slow and prone to bugs when updating libs, particularly with the contribs mgr), share a single instance across all windows. @since 3.0a6 @param sketchMenu the Sketch menu that's currently active
(JMenu sketchMenu)
| 520 | * @param sketchMenu the Sketch menu that's currently active |
| 521 | */ |
| 522 | public void removeImportMenu(JMenu sketchMenu) { |
| 523 | JMenu importMenu = getImportMenu(); |
| 524 | //importMenuIndex = sketchMenu.getComponentZOrder(importMenu); |
| 525 | importMenuIndex = Toolkit.getMenuItemIndex(sketchMenu, importMenu); |
| 526 | sketchMenu.remove(importMenu); |
| 527 | } |
| 528 | |
| 529 | |
| 530 | /** |
no test coverage detected