@@ -1440,7 +1440,7 @@ public void actionPerformed(ActionEvent actionevent) {
1440
1440
for (TargetPlatform targetPlatform : targetPackage .platforms ()) {
1441
1441
for (String customMenuTitle : targetPlatform .getCustomMenus ().values ()) {
1442
1442
JMenu customMenu = new JMenu (tr (customMenuTitle ));
1443
- customMenu .putClientProperty ("platform" , targetPlatform . getId ( ));
1443
+ customMenu .putClientProperty ("platform" , getPlatformUniqueId ( targetPlatform ));
1444
1444
customMenu .putClientProperty ("removeOnWindowDeactivation" , true );
1445
1445
boardsCustomMenus .add (customMenu );
1446
1446
}
@@ -1494,6 +1494,10 @@ public void actionPerformed(ActionEvent actionevent) {
1494
1494
}
1495
1495
}
1496
1496
1497
+ private String getPlatformUniqueId (TargetPlatform platform ) {
1498
+ return platform .getId () + "_" + platform .getFolder ();
1499
+ }
1500
+
1497
1501
private JRadioButtonMenuItem createBoardMenusAndCustomMenus (
1498
1502
final List <JMenu > boardsCustomMenus , List <JMenuItem > menuItemsToClickAfterStartup ,
1499
1503
Map <String , ButtonGroup > buttonGroupsMap ,
@@ -1531,7 +1535,7 @@ public void actionPerformed(ActionEvent actionevent) {
1531
1535
PreferencesMap customMenus = targetPlatform .getCustomMenus ();
1532
1536
for (final String menuId : customMenus .keySet ()) {
1533
1537
String title = customMenus .get (menuId );
1534
- JMenu menu = getBoardCustomMenu (tr (title ), targetPlatform . getId ( ));
1538
+ JMenu menu = getBoardCustomMenu (tr (title ), getPlatformUniqueId ( targetPlatform ));
1535
1539
1536
1540
if (board .hasMenu (menuId )) {
1537
1541
PreferencesMap boardCustomMenu = board .getMenuLabels (menuId );
@@ -1601,9 +1605,9 @@ private static boolean ifThereAreVisibleItemsOn(JMenu menu) {
1601
1605
return false ;
1602
1606
}
1603
1607
1604
- private JMenu getBoardCustomMenu (String label , String platform ) throws Exception {
1608
+ private JMenu getBoardCustomMenu (String label , String platformUniqueId ) throws Exception {
1605
1609
for (JMenu menu : boardsCustomMenus ) {
1606
- if (label .equals (menu .getText ()) && platform . equals ( menu .getClientProperty ("platform" ))) {
1610
+ if (label .equals (menu .getText ()) && menu .getClientProperty ("platform" ). equals ( platformUniqueId )) {
1607
1611
return menu ;
1608
1612
}
1609
1613
}
0 commit comments