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)
| 460 | * @param sketchMenu the Sketch menu that's currently active |
| 461 | */ |
| 462 | public void removeImportMenu(JMenu sketchMenu) { |
| 463 | JMenu importMenu = getImportMenu(); |
| 464 | //importMenuIndex = sketchMenu.getComponentZOrder(importMenu); |
| 465 | importMenuIndex = Toolkit.getMenuItemIndex(sketchMenu, importMenu); |
| 466 | sketchMenu.remove(importMenu); |
| 467 | } |
| 468 | |
| 469 | |
| 470 | /** |
no test coverage detected