コミットメタ情報

リビジョン874496317ffabe882faaccc95c8d5a4bde6974bc (tree)
日時2013-12-02 22:15:27
作者argius <argius.net@gmai...>
コミッターargius

ログメッセージ

Fix #32187: anyActionPerformed -> getActionMap().get(cmd).actionPerformed...

変更サマリ

差分

--- a/src/net/argius/stew/ui/window/DatabaseInfoTree.java
+++ b/src/net/argius/stew/ui/window/DatabaseInfoTree.java
@@ -77,15 +77,10 @@ final class DatabaseInfoTree extends JTree implements AnyActionListener, TextSea
7777 public void anyActionPerformed(AnyActionEvent ev) {
7878 log.atEnter("anyActionPerformed", ev);
7979 if (ev.isAnyOf(copy)) {
80- Object src = ev.getSource();
81- if (src != null && src instanceof JMenuItem) {
82- KeyStroke k = ((JMenuItem)src).getAccelerator();
83- if (k != null) {
84- ActionListener action = getActionForKeyStroke(k);
85- if (action != null) {
86- action.actionPerformed(new ActionEvent(this, 1001, ""));
87- }
88- }
80+ final String cmd = ev.getActionCommand();
81+ Action action = getActionMap().get(cmd);
82+ if (action != null) {
83+ action.actionPerformed(new ActionEvent(this, 1001, cmd));
8984 }
9085 } else if (ev.isAnyOf(copySimpleName)) {
9186 copySimpleName();
旧リポジトリブラウザで表示