Browse Source

Pull request #3989: REPORT-50802 参数面板组建设置面板中,删除按钮的快捷键提示浮窗内容不正确

Merge in DESIGN/design from ~FANGLEI/design10.0:release/10.0 to release/10.0

* commit 'e3385b7167b567482dd7ced5edd28a7f6433e03e':
  REPORT-50802 参数面板组建设置面板中,删除按钮的快捷键提示浮窗内容不正确
zheng-1641779399395
fanglei 4 years ago
parent
commit
3ab60ab761
  1. 9
      designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java

9
designer-base/src/main/java/com/fr/design/actions/core/ActionFactory.java

@ -7,6 +7,7 @@ import com.fr.design.mainframe.JTemplate;
import com.fr.design.menu.MenuKeySet;
import com.fr.design.selection.QuickEditor;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.Action;
import javax.swing.KeyStroke;
@ -14,7 +15,6 @@ import java.awt.event.KeyEvent;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
@ -242,8 +242,11 @@ public class ActionFactory {
KeyStroke keyStroke = (KeyStroke) action.getValue(Action.ACCELERATOR_KEY);
if (keyStroke != null) {
buttonToolTipTextBuf.append(" (");
buttonToolTipTextBuf.append(KeyEvent.getKeyModifiersText(keyStroke.getModifiers()));
buttonToolTipTextBuf.append('+');
String modifiersText = KeyEvent.getKeyModifiersText(keyStroke.getModifiers());
if (!StringUtils.isEmpty(modifiersText)) {
buttonToolTipTextBuf.append(modifiersText);
buttonToolTipTextBuf.append('+');
}
buttonToolTipTextBuf.append(KeyEvent.getKeyText(keyStroke.getKeyCode()));
buttonToolTipTextBuf.append(')');
}

Loading…
Cancel
Save