Author: tfmorris Date: 2008-09-05 11:41:11-0700 New Revision: 15675 Modified: trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java
Log: RESOLVED - task 5366: Fix beep on key releases during save http://argouml.tigris.org/issues/show_bug.cgi?id=5366 Modified: trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java?view=diff&rev=15675&p1=trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java&p2=trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java&r1=15674&r2=15675 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java (original) +++ trunk/src/argouml-app/src/org/argouml/swingext/GlassPane.java 2008-09-05 11:41:11-0700 @@ -26,6 +26,7 @@ import java.awt.event.KeyEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; + import javax.swing.JComponent; import javax.swing.RootPaneContainer; import javax.swing.SwingUtilities; @@ -75,7 +76,9 @@ // discard the event if its source is not from the correct type boolean sourceIsComponent = (event.getSource() instanceof Component); - if ((event instanceof KeyEvent) && sourceIsComponent) { + if ((event instanceof KeyEvent) + && event.getID() != KeyEvent.KEY_RELEASED + && sourceIsComponent) { // If the event originated from the window w/glass pane, consume // the event if ((SwingUtilities.windowForComponent((Component) source) Modified: trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java?view=diff&rev=15675&p1=trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java&p2=trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java&r1=15674&r2=15675 ============================================================================== --- trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java (original) +++ trunk/src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java 2008-09-05 11:41:11-0700 @@ -73,7 +73,6 @@ import org.argouml.uml.ui.ActionStateDiagram; import org.argouml.uml.ui.ActionUseCaseDiagram; import org.argouml.util.KeyEventUtils; -import org.tigris.gef.base.AdjustPageBreaksAction; import org.tigris.gef.base.AlignAction; import org.tigris.gef.base.DistributeAction; import org.tigris.gef.base.ReorderAction; @@ -382,6 +381,7 @@ if (shortcut != null) { KeyStroke keyStroke = shortcut.getCurrentShortcut(); if (keyStroke != null) { + // TODO: This method is obsolete. Use getInputMap etc as below panel.registerKeyboardAction(shortcut.getActionInstance(), keyStroke, JComponent.WHEN_FOCUSED); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
