do not show parens for empty list of shortcuts

This commit is contained in:
Oleg Sukhodolsky
2015-08-07 23:56:22 +03:00
parent 8caf09058d
commit d0a36c77fc
@@ -400,10 +400,10 @@ public abstract class ChooseByNameBase {
final String checkBoxName = myModel.getCheckBoxName();
myCheckBox = new JCheckBox(checkBoxName != null ? checkBoxName +
(myCheckBoxShortcut != null ? " (" +
KeymapUtil
.getShortcutsText(myCheckBoxShortcut.getShortcuts()) +
")" : "") : "");
(myCheckBoxShortcut != null && myCheckBoxShortcut.getShortcuts().length > 0
? " (" + KeymapUtil.getShortcutsText(myCheckBoxShortcut.getShortcuts()) + ")"
: "")
: "");
myCheckBox.setAlignmentX(SwingConstants.RIGHT);
if (!SystemInfo.isMac) {