Ticket #22948: 0001-add-textbox-shortcut-ctrl-shift-z-to-redo.patch

File 0001-add-textbox-shortcut-ctrl-shift-z-to-redo.patch, 2.3 KB (added by tguen, 21 months ago)

patch

  • src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java

    From 3d0d144a5a493d226e8c422201b60b9e0e657231 Mon Sep 17 00:00:00 2001
    From: travis guenther <57420975+tguen@users.noreply.github.com>
    Date: Mon, 8 May 2023 16:58:44 -0700
    Subject: [PATCH] add textbox shortcut ctrl+shift+z to redo
    
    ---
     .../josm/gui/widgets/TextContextualPopupMenu.java            | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java b/src/org/openstreetmap/josm/gui/widgets/TextContextualPopupMenu.java
    index 6d3f93b33..cc91c54cf 100644
    a b import static org.openstreetmap.josm.tools.I18n.tr;  
    55
    66import java.awt.GraphicsEnvironment;
    77import java.awt.event.ActionEvent;
     8import java.awt.event.InputEvent;
    89import java.awt.event.KeyEvent;
    910import java.beans.PropertyChangeListener;
    1011
    public class TextContextualPopupMenu extends JPopupMenu {  
    101102                        KeyStroke.getKeyStroke(KeyEvent.VK_Z, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), undoAction);
    102103                component.getInputMap().put(
    103104                        KeyStroke.getKeyStroke(KeyEvent.VK_Y, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), redoAction);
     105                component.getInputMap().put(
     106                        KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.SHIFT_DOWN_MASK | PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()), redoAction);
    104107            }
    105108            undoRedo = true;
    106109        }
    public class TextContextualPopupMenu extends JPopupMenu {  
    113116                        KeyStroke.getKeyStroke(KeyEvent.VK_Z, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()));
    114117                component.getInputMap().remove(
    115118                        KeyStroke.getKeyStroke(KeyEvent.VK_Y, PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()));
     119                component.getInputMap().remove(
     120                        KeyStroke.getKeyStroke(KeyEvent.VK_Z, InputEvent.SHIFT_DOWN_MASK | PlatformManager.getPlatform().getMenuShortcutKeyMaskEx()));
    116121            }
    117122            component.getDocument().removeUndoableEditListener(undoEditListener);
    118123            undoRedo = false;